<div dir="ltr">Doh! Thanks for that.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 10:48 AM, Marten van Kerkwijk <span dir="ltr"><<a href="mailto:m.h.vankerkwijk@gmail.com" target="_blank">m.h.vankerkwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Stuart,<br>
<br>
It certainly seems correct behaviour to return the subclass you<br>
created: after all, you might want to keep the information on<br>
`columns` (e.g., consider doing nanmin along a given axis). Indeed, we<br>
certainly want to keep the unit in astropy's Quantity (which also is a<br>
subclass of ndarray).<br>
<br>
On the shape: shouldn't that be print(np.nanmin(r).shape)??<br>
<br>
Overall, I think it is worth considering very carefully what exactly<br>
you try to accomplish; if different elements along a given axis have<br>
different meaning, I'm not sure it makes all that much sense to treat<br>
them as a single array (e.g., np.sin might be useful for one column,<br>
not not another). Even if pandas is slower, the advantage in clarity<br>
of what is happening might well be more important in the long run.<br>
<br>
All the best,<br>
<br>
Marten<br>
<br>
p.s. nanmin is not a ufunc; you can find it in numpy/lib/nan_functions.py<br>
______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
</blockquote></div><br></div>