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@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to