Hi all, Using `np.ndenumerate` on masked arrays gives unexpected results. For instance,
next(np.ndenumerate(np.ma.masked_all(()))) does *not* equal `((), np.ma.masked)`, but instead contains whatever value happens to be in the uninitialized data part of the masked array. Even better than yielding `((), np.ma.masked)` would be for `ndenumerate` to skip masked entries altogether. After all, we are also getting the index of the entries we are iterating over. I went ahead and implemented this specialization of `ndenumerate` for masked arrays: https://github.com/numpy/numpy/pull/20020 If there is anything I can do to advance this pull request, please let me know. Regards, - Jouke _______________________________________________ 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