summaryrefslogtreecommitdiff
path: root/numpy/array_api/_array_object.py
diff options
context:
space:
mode:
authorIvan Yashchuk <ivan.yashchuk@aalto.fi>2021-11-29 10:45:15 +0000
committerIvan Yashchuk <ivan.yashchuk@aalto.fi>2021-11-29 11:09:34 +0000
commit729b85e5d49257a20249e5c2d4f8f4072594f984 (patch)
treecf6e0b94b2ac416046ba2de85f4e7f329f856a97 /numpy/array_api/_array_object.py
parentc8fdb53ee2d1b1130a74ad7a3250366fd042da3f (diff)
downloadnumpy-729b85e5d49257a20249e5c2d4f8f4072594f984.tar.gz
BUG: Fix tensorsolve for 0-sized input
`array.reshape(-1, size)` doesn't work with 0 in the dimensions. The fix is to use explicit shape instead of `-1`. For "non-square" tensors the `ValueError` would come from the reshape call, while previously `LinAlgError` appeared from the solve call. To have the same error type I added a check for squareness before the reshape.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions