argmin of an empty sequence throws an exception, which I think is a good thing: np.argmin([]) --------------------------------------------------------------------------- ValueError
But not for a masked array: n [24]: u = np.arange (10) In [25]: v = np.ma.array (u, mask=np.ones(10)) In [26]: v Out[26]: masked_array(data=[--, --, --, --, --, --, --, --, --, --], mask=[ True, True, True, True, True, True, True, True, True, True], fill_value=999999, dtype=int64) In [28]: np.argmin(v) Out[28]: 0 This is error prone and inconsistent.
_______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com