Re: [Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols

2020-01-17 Thread Eric Wieser
> > *Reply to: *Discussion of Numerical Python > *Date: *Friday, 17. January 2020 at 11:40 > *To: *Discussion of Numerical Python > *Subject: *[Numpy-discussion] Adding an nd generalization of > np.ma.mask_rowscols > > > > Today, numpy has a np.ma.mask_rowcols func

Re: [Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols

2020-01-17 Thread Hameer Abbasi
Reply to: Discussion of Numerical Python Date: Friday, 17. January 2020 at 11:40 To: Discussion of Numerical Python Subject: [Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols Today, numpy has a np.ma.mask_rowcols function, which stretches masks along the full length of an axis

Re: [Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols

2020-01-17 Thread Sebastian Berg
On Fri, 2020-01-17 at 10:39 +, Eric Wieser wrote: > Today, numpy has a np.ma.mask_rowcols function, which stretches masks > along > 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

[Numpy-discussion] Adding an nd generalization of np.ma.mask_rowscols

2020-01-17 Thread Eric Wieser
Today, numpy has a np.ma.mask_rowcols function, which stretches masks along the full length of an axis. For example, given the matrix:: >>> a2d = np.zeros((3, 3), dtype=int) >>> a2d[1, 1] = 1 >>> a2d = np.ma.masked_equal(a2d, 1) >>> print(a2d) [[0 0 0] [0 -- 0] [0 0 0]] The API allows:: >>> pr