Closed kgryte closed 11 months ago
As this PR has been discussed during Consortium meetings and no objections have been raised either here or in the original RFC (https://github.com/data-apis/array-api/issues/655), will merge. Any further changes can be addressed in follow-up PRs...
This PR
repetitions
) be a tuple ofints
. NumPy et al support providing an integer; however, PyTorch and TensorFlow do not. PyTorch requires a tuple. TensorFlow requires an array. This PR seeks to find common ground by requiringrepetitions
to be a tuple.len(repetitions)
is less than the rank ofx
, then ones are prepended torepetitions
. If the rank ofx
is less thanlen(repetitions)
, singleton dimensions are prepended tox
. TensorFlow does not support this behavior, requiring thatrepetitions.shape[0]
equal the rank ofx
.