On Wed, Feb 26, 2020 at 5:27 PM <josef.p...@gmail.com> wrote:

> great another object array
>
> np.asarray([round(x_i.item()) for x_i in np.array([1, 2.5, 2e20, 2e200])])
> array([1, 2, 200000000000000000000,
>
>  
> 199999999999999993946624442502072331894900655091004725296483501900693696871108151068392676809412503736055024831947764816364271468736556969278770082094479755742047182133579963622363626612334257709776896],
>       dtype=object)
>
>
> I would rather have numpy consistent with numpy than with python
>

Since round() (and the __round__() interface) is part of Python and not
numpy, there is nothing in numpy to be consistent with. We only implement
__round__() for the scalar types.

-- 
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to