[Numpy-discussion] masked_values behaviour

Jesper Larsen jesper.webmail at gmail.com
Mon Dec 18 04:57:18 EST 2017


Thanks for the responses Paul and Marten,

I have raised an issue for the issue at:

https://github.com/numpy/numpy/issues/10227

Best regards,
Jesper

2017-12-16 22:48 GMT+01:00 Marten van Kerkwijk <m.h.vankerkwijk at gmail.com>:

> Definitely a big! The underlying problem is:
> ```
> In [23]: np.abs(np.int16(-32768))
> Out[23]: -32768
> ```
> This is not great, but perhaps consistent with the logic that abs
> should return a value of the same dtype.
>
> It could be solved inside `masked_values` by using `np.abs(value,
> dtype=xnew.dtype)`
>
> Do you want to have a go at fixing this? Or raise an issue at
> https://github.com/numpy/numpy
>
> -- Marten
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20171218/9e3a8209/attachment.html>


More information about the NumPy-Discussion mailing list