Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

M-Mueller
Copy link

Passing a scalar value to np.asscalar now returns the scalar instead of
raising an AttributeError. See #4701.

(Part of EuroScipPy 2018 Sprints)

Passing a scalar value to np.asscalar now returns the scalar instead of
raising an AttributeError. See #4701.
@eric-wieser
Copy link
Member

Duplicates #5126

if isscalar(a):
return a
else:
raise e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as a bare raise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants