On Thu, 8 Sept 2022, 19:42 Sebastian Berg, <sebast...@sipsolutions.net>
wrote:

>
> 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?


> From the Python documentation on repr:


>From the Python documentation on repr:

"this should look like a valid Python expression that could be used to
recreate an object with the same value"

I think it definitely we should definitely have:

repr(np.float32(34.3)) == 'float32(34.3)'
And
str(np.float32(34.3)) == '34.3'

It seems buglike not to have that.
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to