Skip to content
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

work around numpy deprecation warning #154

Conversation

jenshnielsen
Copy link
Collaborator

Calling nonzero on a 0d array is deprecated.

If you read the docs of np.where it turns out that the one argument form of this
is equivalent to np.asarray(condition).nonzero()
so follow the advise in the deprecation warning and rewrite this to np.atleast_1d(np.asarray(condition)).nonzero()

calling nonzero on a 0d array is deprecated

if you read the docs of np.where it turns out that the one argument form of this

is equivalent to np.asarray(condition).nonzero()

so follow the advise in the deprecation warning and rewrite this to np.atleast_1d(np.asarray(condition)).nonzero()
@jenshnielsen jenshnielsen merged commit 8f9e48d into toolsforexperiments:master Nov 23, 2020
@jenshnielsen jenshnielsen deleted the fix_numpy_deprecation_warning branch November 23, 2020 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants