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
DOC: Partially update compress_{cols,rows} #22287
base: main
Are you sure you want to change the base?
Conversation
issue-22269 compress_cols issue-22269 compress_cols issue-22269 compress_cols,compress_rows
>>> np.ma.compress_nd(x) | ||
array([[7, 8]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something wrong here: the input array doesn't contain the values 7, 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, The x should be x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0],[1,0,0],[0,0,0]]. I will fix it now.
…tmask,ediff1d,power,max
…tmask,ediff1d,power,max,min
[1,0,0], | ||
[0,0,0]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1,0,0], | |
[0,0,0]]) | |
... [1, 0, 0], | |
... [0, 0, 0]]) |
Not sure how we format the new line, but this should be OK. You do need the ...
to continue the input line though, otherwise it looks like a single line with output (and the test fails).
Examples | ||
-------- | ||
>>> x = np.ma.array([1, 3, 4, 6], mask=[0, 0, 0, 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> x = np.ma.array([1, 3, 4, 6], mask=[0, 0, 0, 1]) | |
>>> x = np.ma.array([1, 3, 4, 6], mask=[0, 0, 0, 1]) |
There should only be a single space here, this also trips the test suite. (Also below)
>>> np.putmask(x, x>2, x**2) | ||
>>> x | ||
array([[ 0, 1, 2], | ||
[ 9, 16, 25]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this should align properly:
[ 9, 16, 25]]) | |
[ 9, 16, 25]]) |
Should do it (I think). Although it probably doesn't trip the test suite at least.
Thanks, I only had a brief look, but it does look like a nice, comprehensive addition of docs. There were also a few places with a two blank lines instead of one.
which checks that the code you put actually runs correctly. |
Partially addresses #22269 as part of #GHC22