Re: [Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Matthew Brett
On Mon, Sep 17, 2018 at 2:24 PM, Warren Weckesser wrote: > > > On Mon, Sep 17, 2018 at 7:38 AM Matthew Brett > wrote: >> >> Hi, >> >> Is there any reason that np.count_nonzero should not take an axis >> argument? As in: >> >> >>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1) >> array([2, 1

[Numpy-discussion] Helper function for assignment from other structured arrays

2018-09-17 Thread Feng Yu
Hi, Assignment between structured arrays are matching by the order of fields, not by names of fields. Is there a recommended way of assignment by matching field names? I can see one way is to explicitly looping over the names; another possibility is to use the field names of the target array to i

Re: [Numpy-discussion] Adding `max_rows` to `loadtxt'

2018-09-17 Thread Stefan van der Walt
It looks good to me too, to especially with Eric's refinements. Best regards, Stéfan On September 16, 2018 21:23:44 Stephan Hoyer wrote: This seems like a minor and uncontroversial improvement. No objections from me! On Sun, Sep 16, 2018 at 2:01 PM Matti Picus wrote: A new contributor submit

[Numpy-discussion] Search not working on www.numpy.org/devdocs/search.html

2018-09-17 Thread Matti Picus
I can enter a search term (say `ndarray`) in www.numpy.org/devdocs/search.html, but the result is empty. It worked yesterday. My firefox javascript debug console for the remote search says: jQuery.Deferred exception: Search is not defined @http://www.numpy.org/devdocs/search.html?q=ndarray:34:

Re: [Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Warren Weckesser
On Mon, Sep 17, 2018 at 7:38 AM Matthew Brett wrote: > Hi, > > Is there any reason that np.count_nonzero should not take an axis > argument? As in: > > >>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1) > array([2, 1]) > > It already does (since version 1.12.0): https://docs.scipy.org/doc/

Re: [Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Sebastian Berg
On Mon, 2018-09-17 at 12:37 +0100, Matthew Brett wrote: > Hi, > > Is there any reason that np.count_nonzero should not take an axis > argument? As in: > No, sounds like an obvious improvement, but as also with those, someone has to volunteer to do it... Coding it will probably mean adding the N

Re: [Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Juan Nunez-Iglesias
On Mon, Sep 17, 2018, at 9:37 PM, Matthew Brett wrote: > >>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1) > array([2, 1]) > > It would be much more useful if it did... You might know about this already, but I not too long ago discovered np.apply_along_axis [1], which is a magical function

[Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Matthew Brett
Hi, Is there any reason that np.count_nonzero should not take an axis argument? As in: >>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1) array([2, 1]) It would be much more useful if it did... Cheers, Matthew ___ NumPy-Discussion mailing list

[Numpy-discussion] ANN: SfePy 2018.3

2018-09-17 Thread Robert Cimrman
I am pleased to announce release 2018.3 of SfePy. Description --- SfePy (simple finite elements in Python) is a software for solving systems of coupled partial differential equations by the finite element method or by the isogeometric analysis (limited support). It is distributed under t