[Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols
sebastian at sipsolutions.net
Fri Jan 17 10:27:48 EST 2020
On Fri, 2020-01-17 at 10:39 +0000, Eric Wieser wrote:
> Today, numpy has a np.ma.mask_rowcols function, which stretches masks
> the full length of an axis. For example, given the matrix::
> Questions for the mailing list then:
The additional question: I think I am good with adding a new name if we
cannot reasonably reuse the old ones.
> Can you think of a better name than mask_extend_axis?
Doubt it is good, but to put it there: extend_mask_along_axis
"along" shows up 2-3 times, although "along" really is the default for
most things in NumPy.
Tried thesaurus for "extend", the main other word seemed "spread" (but
it is very different from the current choice).
> Does my proposed meaning of axis make more sense to you than the one
> used by mask_rowcols?
It does to me (although I hardly ever use masked arrays). The `axis`
argument usually denotes the axis being operated on/along.
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the NumPy-Discussion