Re: [Numpy-discussion] NumPy video content: creating a YouTube channel

2021-01-25 Thread Joe Harrington
On 1/25/21, 12:44 PM, Melissa Mendonça wrote: The NumPy Documentation Team has been discussing video content as part of our outreach and documentation efforts, in part inspired by the excellent Spyder IDE channel [1]. At our last meeting, we realized there is already a good amount of content a

Re: [Numpy-discussion] How to Capitalize numpy?

2019-09-16 Thread Joe Harrington
Here are my thoughts on textual capitalization (at first, I thought you wanted to raise money!): We all agree that in code, it is "numpy".  If you don't use that, it throws an error.  If, in text, we keep "numpy" with a forced lower-case letter at the start, it is just one more oddball to reme

Re: [Numpy-discussion] Style guide for numpy code?

2019-05-09 Thread Joe Harrington
I have a handout for my PHZ 3150 Introduction to Numerical Computing course that includes some rules: (a) All integer-valued floating-point numbers should have decimal points after them. For example, if you have a time of 10 sec, do not use y = np.e**10 # sec use y = np.e**10. # sec instea

Re: [Numpy-discussion] grant proposal for core scientific Python projects (rejected)

2019-05-03 Thread Joe Harrington
nd NOAA to see if there’s anything similar. -CHB On Apr 25, 2019, at 1:04 PM, Ralf Gommers mailto:ralf.gomm...@gmail.com>> wrote: On Sat, Apr 20, 2019 at 12:41 PM Ralf Gommers mailto:ralf.g

Re: [Numpy-discussion] grant proposal for core scientific Python projects (rejected)

2019-04-18 Thread Joe Harrington
Hi Ralf, The rejection is disappointing, for sure.  Some good ammo for next time might be the recommendations in this report from the US National Academies of Science, Engineering, and Medicine: http://sites.nationalacademies.org/SSB/CurrentProjects/SSB_178892 https://www.nap.edu/read/25217/

Re: [Numpy-discussion] Depreciating asfortranarray and ascontiguousarray

2018-10-25 Thread Joe Kington
imarily used for are likely to be read by developers working in other languages (i.e. ascontiguousarray gets used at a lot of "boundaries" with other systems), keeping function names that make intention very clear is important. Just my $0.02, anyway. Cheers, -Joe On Thu, Oct 25,

Re: [Numpy-discussion] NEUROLAB - SPYDER

2018-03-30 Thread Joe
Hi, Download here: https://pypi.python.org/pypi/neurolab Though, I can't recommend to use it. I did a while ago and it is a pretty basic project that seems to be no longer maintained. I use Keras / Theano now instead, which is a mature and widely used package. Kind regards, Joe

Re: [Numpy-discussion] Using np.frombuffer and cffi.buffer on array of C structs (problem with struct member padding)

2018-01-30 Thread Joe
Does someone know of a function or a convenient way to automatically derive a dtype object from a C typedef struct string or a cffi.typeof()? Am 27.01.2018 10:30 schrieb Joe: Thanks for your help on this! This solved my issue. Am 25.01.2018 um 19:01 schrieb Allan Haldane: There is a new

Re: [Numpy-discussion] Using np.frombuffer and cffi.buffer on array of C structs (problem with struct member padding)

2018-01-27 Thread Joe
Thanks for your help on this! This solved my issue. Am 25.01.2018 um 19:01 schrieb Allan Haldane: There is a new section discussing alignment in the numpy 1.14 structured array docs, which has some hints about interfacing with C structs. These new 1.14 docs are not online yet on scipy.org, but

[Numpy-discussion] Using np.frombuffer and cffi.buffer on array of C structs (problem with struct member padding)

2018-01-25 Thread Joe
/48423725/how-to-handle-member-padding-in-struct-when-reading-cffi-buffer-with-numpy-fromb Kind regards, Joe ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Does x[True] trigger basic or advanced indexing?

2017-12-14 Thread Joe
`. It all makes perfect sense if you think of it of a 0-d array picking The same thing is true for example for lists of booleans. - Sebastian On Thu, Dec 14, 2017, 04:27 Joe wrote: > Hello, > thanks for you feedback. > > Sorry, if thie question is stupid and the case below does

Re: [Numpy-discussion] Does x[True] trigger basic or advanced indexing?

2017-12-14 Thread Joe
treated as a tuple of integers, but as a 0d mask Eric On Wed, 13 Dec 2017 at 12:44 Joe wrote: Hi, yet another question. I looked through the indexing rules in the documentation but I count not find which one applies to x[True] and x[False] that might e.g result from import numpy as np x

[Numpy-discussion] Does x[True] trigger basic or advanced indexing?

2017-12-13 Thread Joe
r ndarray (of data type integer or bool)", right? Or will x[True] trigger basic indexing as it is "a tuple of integers" because True will be converted to Int? Cheers, Joe ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://

[Numpy-discussion] What is the pythonic way to write a function that handles arrays and scalars?

2017-12-12 Thread Joe
scalar_input: return np.squeeze(ret) return ret Is this as good as it gets or do you have other suggestions? Cheers, Joe ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Which rule makes x[np.newaxis, :] and x[np.newaxis] equivalent?

2017-12-12 Thread Joe
12.2017 09:09 schrieb Nathaniel Smith: On Tue, Dec 12, 2017 at 12:02 AM, Joe wrote: Hi, question says it all. I looked through the basic and advanced indexing, but I could not find the rule that is applied to make x[np.newaxis,:] and x[np.newaxis] the same. I think it's the genera

[Numpy-discussion] Which rule makes x[np.newaxis,:] and x[np.newaxis] equivalent?

2017-12-12 Thread Joe
Hi, question says it all. I looked through the basic and advanced indexing, but I could not find the rule that is applied to make x[np.newaxis,:] and x[np.newaxis] the same. Kind regards, Joe ___ NumPy-Discussion mailing list NumPy-Discussion

[Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Joe
me shape along all but the first axis." So it was possible to stack an array (3,) and (2, 3) to a (3, 3) array without using e.g. atleast_2d on the (3,) array. Is there a possibility to mimic that behavior with np.concatenate or np.stack? Joe

Re: [Numpy-discussion] Questions on np.piecewise

2017-09-15 Thread Joe
Your example doesn't run, but here is one that does: In [8]: x = np.array([50], dtype=float) In [9]: np.piecewise(x, [0 < x <= 90, 90 < x <= 180], [1.1, 2.1]) array([ 1.1]) The answer to your second question is that it is returning an array with the same dtype as its first argument. The answer

[Numpy-discussion] Questions on np.piecewise

2017-09-15 Thread Joe
], [1.1, 2.1]) return [2] and not [2.1] ? Kind regards, Joe ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Input on np.ma.polyfit default behaviour

2017-06-01 Thread Joe P Ninan
being discussed in Issue#9193 page. Thanks, -cheers Joe -- /--- "GNU/Linux: because a PC is a terrible thing to waste" - GNU Generation ******** Joe Philip Ninan Postdoctoral Researcher