TL;DR: NumPy scalars representation is e.g. `34.3` instead of
`float32(34.3)`. So the representation is missing the type
information. What are your thoughts on changing that?
Hi all,
I am thinking about the next steps for NEP 50 (The NEP wants to fix the
NumPy promotion rules, especially with respect to scalars):
https://numpy.org/neps/nep-0050-scalar-promotion.html
In relation to that, there was one point that Stéfan brought up
previously.
The NumPy scalars (representation) currently print as numbers:
>>> np.float32(34.3)
34.3
>>> np.uint8(5)
5
That can already be confusing now. However, it gets more problematic
if NEP 50 is introduced since the behavior between a Python `34.3` and
`np.float32(34.3)` would differ more than it does now (please refer to
the NEP).
The change would be that we should print as:
float64(34.3) (or similar?)
This Email is mainly to ask for any feedback or concern on such a
change. I suspect we may have to write a very brief NEP about it.
If there is little concern, maybe we could move forward such a change
promptly. Otherwise it could be moved forward together with NEP 50 and
take effect in a "major" release [1].
Cheers,
Sebastian
[1] Note that for me, even a major release would hopefully not affect
the majority of users or be very disruptive.
As part of the CZI grant “Advancing an Inclusive Culture in the Scientific
Python ecosystem“, NumPy, SciPy, Matplotlib, and pandas, the four funded
projects, have released a report highlighting areas of focus for the coming
months. Members of the Scientific Python and broader OSS communities are
invited to participate in a series of the Culture Labs to discuss and
actively work on improving communication, conflict mediation, and creating
a culture of belonging in our communities. For more information about this
initiative and how to join, visit:
https://contributor-experience.org/docs/posts/dei-report/.
--
Cheers,
Inessa
Inessa Pawson
Contributor Experience Lead | NumPy
https://numpy.org/
GitHub: inessapawson
Dear mentors,
I have been trying to solve this issue(for round_). I found that this(round_) is not included into the latest documentation of version 1.24 and it was last time introduced into version 1.13 documentation. As I can see round_ is working for 1.24.2 and it will be removed in version 2.0 . So, I am curious to know that changing the codebase to include it's(round_) example(which is now directed with the link of latest version of around) will change documentation for version 1.13? If not then we are using 1.24 and so, how it will be seen in version 1.24 as round_ is not included in that documentation? Or should be remove round_ label from this issue. Guiding/correcting me will be very helpful.
This is how round_ looks like in documentation (https://numpy.org/doc/1.13/reference/generated/numpy.round_.html) it was last updated on Jun 10, 2017.
Thanks
Mohit Kumar