[Numpy-discussion] Extent to which to work around matrix and other duck/subclass limitations

2019-06-10 Thread Marten van Kerkwijk
Hi All, In https://github.com/numpy/numpy/pull/12801, Tyler has been trying to use the new `where` argument for reductions to implement `nansum`, etc., using simplifications that boil down to `np.sum(..., where=~isnan(...))`. A problem that occurs is that `np.sum` will use a `.sum` method if that

Re: [Numpy-discussion] Extent to which to work around matrix and other duck/subclass limitations

2019-06-10 Thread Hameer Abbasi
On Mon, 2019-06-10 at 13:47 -0400, Marten van Kerkwijk wrote: > Hi All, > > In https://github.com/numpy/numpy/pull/12801, Tyler has been trying > to use the new `where` argument for reductions to implement `nansum`, > etc., using simplifications that boil down to `np.sum(..., > where=~isnan(...))`