<div dir="ltr"><div><div><div>Thanks for the responses Paul and Marten,<br><br></div>I have raised an issue for the issue at:<br><br><a href="https://github.com/numpy/numpy/issues/10227">https://github.com/numpy/numpy/issues/10227</a><br><br></div>Best regards,<br></div>Jesper<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-16 22:48 GMT+01:00 Marten van Kerkwijk <span dir="ltr"><<a href="mailto:m.h.vankerkwijk@gmail.com" target="_blank">m.h.vankerkwijk@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Definitely a big! The underlying problem is:<br>
```<br>
In [23]: np.abs(np.int16(-32768))<br>
Out[23]: -32768<br>
```<br>
This is not great, but perhaps consistent with the logic that abs<br>
should return a value of the same dtype.<br>
<br>
It could be solved inside `masked_values` by using `np.abs(value,<br>
dtype=xnew.dtype)`<br>
<br>
Do you want to have a go at fixing this? Or raise an issue at<br>
<a href="https://github.com/numpy/numpy" rel="noreferrer" target="_blank">https://github.com/numpy/numpy</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-- Marten<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
</div></div></blockquote></div><br></div>