[Numpy-discussion] ANN: SfePy 2018.3
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 the new BSD license. Home page: http://sfepy.org Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/ Git (source) repository, issue tracker: https://github.com/sfepy/sfepy Highlights of this release -- - easier setting of values of variables - new script for outline edge extraction - new example: homogenization of a piezoelectric heterogeneous structure For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Cheers, Robert Cimrman --- Contributors to this release in alphabetical order: Robert Cimrman Vladimir Lukes ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] count_nonzero axis argument?
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@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] count_nonzero axis argument?
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 that makes all functions axis aware. Obviously I would support adding an axis keyword to count_nonzero, but in the meantime this function gets you there quickly! Juan. .. [1] https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.apply_along_axis.html ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] count_nonzero axis argument?
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 NpyIter and possibly fast paths (not sure about the state of count nonzero), but should not be very difficult. - Sebastian > > > > 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@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion > signature.asc Description: This is a digitally signed message part ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] count_nonzero axis argument?
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/numpy/reference/generated/numpy.count_nonzero.html Warren It would be much more useful if it did... > > Cheers, > > Matthew > ___ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion > ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Search not working on www.numpy.org/devdocs/search.html
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:25 j@http://www.numpy.org/devdocs/_static/jquery.js:2:29997 g/http://www.numpy.org/devdocs/_static/jquery.js:2:30313 undefined If I build the documentation locally, search emits a different error but still works: XML Parsing Error: not well-formed Location: file:///.../doc/build/html/searchindex.js Line Number 1, Column 16: Searching on scipy.org, for instance https://docs.scipy.org/doc/numpy/search.html?q=ndarray&check_keywords=yes&area=default works with no errors on the console Any hints? Matti ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Adding `max_rows` to `loadtxt'
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 submitted a PR[0] to add `max_rows`[1] to `loadtxt`, like is done in 'genfromtxt', (which is used under the hood for 'ndfromtxt', 'mafromtxt', and 'recfromtxt`). Any thoughts? ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Helper function for assignment from other structured arrays
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 index the source array. It would be nice if a recommended practice is provided as example near the documentation on the topic: https://docs.scipy.org/doc/numpy/user/basics.rec.html#assignment-from-other-structured-arrays Thanks, Yu ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] count_nonzero axis argument?
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]) >> > > > It already does (since version 1.12.0): > https://docs.scipy.org/doc/numpy/reference/generated/numpy.count_nonzero.html Oops - sorry - I am so used to upgrading all the time, it didn't occur to me I had an old version in my standard setup. Thanks, and sorry for the distraction. Cheers, Matthew ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion