Skip to content

BUG: Linalg.pinv fails on stacks of matrices #8826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eric-wieser opened this issue Mar 24, 2017 · 0 comments
Closed

BUG: Linalg.pinv fails on stacks of matrices #8826

eric-wieser opened this issue Mar 24, 2017 · 0 comments

Comments

@eric-wieser
Copy link
Member

>>> a = np.stack((np.eye(3),)*4, axis=0)
>>> ai = np.linalg.inv(a)
>>> assert (a == ai).all()
>>> api = np.linalg.pinv(a)
Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    np.linalg.pinv(a)
  File "C:\Program Files\Python 3.5\lib\site-packages\numpy\linalg\linalg.py", line 1668, in pinv
    if s[i] > cutoff:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
eric-wieser added a commit to eric-wieser/numpy that referenced this issue Sep 13, 2017
theodoregoetz pushed a commit to theodoregoetz/numpy that referenced this issue Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant