On Thu, 8 Sept 2022, 19:42 Sebastian Berg, <[email protected]>
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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: [email protected]

Reply via email to