-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
ENH: Changed repr of np.bool_ #17592
Conversation
Some tests are forming cores, will send the mail to the mailing list, once that's fixed |
Do macs have a different set of tests? I noticed this is failing. |
It's working in linux: (Pdb) p numpy_f
<function any at 0x7f78f15e7310>
(Pdb) p numpy_f(a, axis=1, keepdims=True)[...,:-1]
masked_array(
data=[[[True, False, True]],
[[True, False, True]]],
mask=[[[False, False, False]],
[[False, False, False]]],
fill_value=numpy.True_) > /home/ganesh/open-source/numpy/build/testenv/lib/python3.8/site-packages/numpy/ma/tests/test_core.py(4948)testkeepdims()
-> assert_equal(ma_f(a, keepdims=True).shape,
(Pdb) p ma_f(a, axis=1, keepdims=True)[...,:-1]
masked_array(
data=[[[True, False, True]],
[[True, False, True]]],
mask=[[[False, False, False]],
[[False, False, False]]],
fill_value=numpy.True_)
(Pdb) p f
'any' numpy/numpy/ma/tests/test_core.py Lines 4958 to 4960 in 32f1359
Any idea why it's failing only on Mac? |
The test that is failing is a documentation test, and I guess the documentation tests are only run on mac? You need to update the docstrings to use the new printing. |
The incantation is |
4dd12ce
to
9ae76ee
Compare
I have emailed the mailing list (nabble link, pipermail link)for their opinion @eric-wieser, as mentioned in the issue. |
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.
Can you add an "improvements" release note, like we did when we improved void.__repr__
with https://numpy.org/doc/stable/release/1.14.0-notes.html#void-datatype-elements-are-now-printed-in-hex-notation?
084f71d
to
d7fe576
Compare
@eric-wieser , any more changes needed? |
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.
Looks good to me, and the mailing list seems not to care. Will leave this for another maintainer to push the button on if they agree.
I reworded the release note slightly to make clear also what did not change.
Thanks Eric, sure |
Happy to put this in as such, although I wonder a bit whether this has the potential to be a slightly noisy transition, and 1.20 is already a big release. |
This is different from every other NumPy scalar, Also reprs don't usually include the module. |
We are a bit unsure whether this is a good idea at all, could you propose this on the mailing list, since it is an API change? |
This already hit the mailing list and was meet with silence |
25994a9
to
18d91c0
Compare
Summarizing the current status:
|
The changes here were included in gh-22449 so closing this one. |
Changes:
Changed repr of np.bool_
resolves #12950
refers: #5942, #7913
After Fix:
Note:
I expect a lot of UT and Doc failures, will fix as we go along.
cc: @eric-wieser , @seberg