We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In '3. NumPy exercises.ipynb' under Logic functions, the example for any is incorrect: X.any returns True even if there are no zeros.
any
X.any
Since the fix depends on the intent/goal of the question, there are different ways of fixing it, for example:
# Given the X numpy array, return True if any of its elements is zero X = np.array([-1, 2, 0, -4, 5, 6, 0, 0, -9, 10]) np.any(X==0)
# Given the X numpy array, return True if any of its elements is true X = np.array([-1, 2, 0, -4, 5, 6, 0, 0, -9, 10]) X.any()
The text was updated successfully, but these errors were encountered:
I was about to raise this issue as well. Thanks.
Sorry, something went wrong.
"Given the X numpy array, return true if any of its element is non-zero."
No branches or pull requests
In '3. NumPy exercises.ipynb' under Logic functions, the example for
any
is incorrect:X.any
returns True even if there are no zeros.Since the fix depends on the intent/goal of the question, there are different ways of fixing it, for example:
The text was updated successfully, but these errors were encountered: