> On 22 Oct 2024, at 18:00, numpy-discussion-requ...@python.org wrote: > > From: Neal Becker <ndbeck...@gmail.com> > Subject: [Numpy-discussion] np.ndenumerate doesn't obey mask? > Date: 21 October 2024 at 18:52:41 CEST > To: Discussion of Numerical Python <numpy-discussion@python.org> > Reply-To: Discussion of Numerical Python <numpy-discussion@python.org> > > > I was using ndenuerate with a masked array, and it seems that the mask is > ignored. Is this true? If so, isn't that a bug? >
This is expected behaviour: you should use the function from the “.ma" namespace “numpy.ma.ndenumerate" <https://numpy.org/devdocs/reference/generated/numpy.ma.ndenumerate.html#numpy-ma-ndenumerate> for skipping masked elements. By design numpy.enumerate does not skip masked elements. Stefano _______________________________________________ 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