Re: [Numpy-discussion] Improving Complex Comparison/Ordering in Numpy

2020-07-01 Thread Sebastian Berg
On Wed, 2020-07-01 at 12:48 -0700, Stephan Hoyer wrote: > On Wed, Jul 1, 2020 at 12:23 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > This is a WIP, but allows nicely to try out how the new API > > could/should look like, and see the potential im

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-07-06 Thread Sebastian Berg
On Mon, 2020-07-06 at 12:39 -0600, Aaron Meurer wrote: > I've been trying to figure out this behavior. It doesn't seem to be > documented at > https://numpy.org/doc/stable/reference/arrays.indexing.html > > > > > a = np.empty((2, 3)) > > > > a.shape > (2, 5) > > > > a[True].shape > (1, 2, 5) > >

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-07-07 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday July 8th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Descr

[Numpy-discussion] NumPy Sprint on the weekend

2020-07-10 Thread Sebastian Berg
Hi all, since there is the SciPy sprints going on we will also be joining the event and sprinting as well. The kickoff for the SciPy sprint session is at 9:00 CST (7:00 PST, 16:00 CET), with the start of the sprints around 9:30. We are gathering all information at the hackmd: https://hackmd.io/

Re: [Numpy-discussion] An alternative to vectorize that lets you access the array?

2020-07-12 Thread Sebastian Berg
On Sun, 2020-07-12 at 16:00 +0300, Ram Rachum wrote: > Hi everyone, > > Here's a problem I've been dealing with. I wonder whether NumPy has a > tool > that will help me, or whether this could be a useful feature request. > > In the upcoming EuroPython 20200, I'll do a talk about live-coding a > m

Re: [Numpy-discussion] Numpy FFT normalization options issue (addition of new option)

2020-07-12 Thread Sebastian Berg
Just a heads-up. As I think the discussion seemed to settled on "backwards" (default, identical to None), "forward" and the existing "ortho". Thus "forward" and "backward" are now new valid values for the `norm` keyword argument to the fft functions in NumPy. (see https://github.com/numpy/numpy/

Re: [Numpy-discussion] An alternative to vectorize that lets you access the array?

2020-07-13 Thread Sebastian Berg
be a nice improvement to make vectorize more replaceable). - Sebastian > > > On Sun, Jul 12, 2020 at 5:03 PM Sebastian Berg < > > sebast...@sipsolutions.net> > > wrote: > > > > > On Sun, 2020-07-12 at 16:00 +0300, Ram Rachum wrote: > > >

[Numpy-discussion] NumPy Development Meeting Today - Triage Focus

2020-07-15 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, July 15th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-07-21 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday July 22nd at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Des

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-07-22 Thread Sebastian Berg
On Wed, 2020-07-22 at 16:23 -0600, Aaron Meurer wrote: > Why does fancy indexing have this behavior? > > > > > a = np.empty((0, 1, 2)) > > > > b = np.empty((1, 1, 2)) > > > > a[np.array([10, 10])] > Traceback (most recent call last): > File "", line 1, in > IndexError: index 10 is out of bounds

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-07-22 Thread Sebastian Berg
heers, Sebastian > > Aaron Meurer > > On Wed, Jul 22, 2020 at 4:32 PM Sebastian Berg > wrote: > > On Wed, 2020-07-22 at 16:23 -0600, Aaron Meurer wrote: > > > Why does fancy indexing have this behavior? > > > > > > > > > a = np.empty(

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-07-23 Thread Sebastian Berg
On Wed, 2020-07-22 at 17:35 -0600, Aaron Meurer wrote: > > About your warnings, do you have a nice way to do that? The > > mechanism > > for warnings does not really give a good way to catch that a > > warning > > was raised and then turn it into an error. Unless someone > > contributes > > a sli

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-07-23 Thread Sebastian Berg
On Thu, 2020-07-23 at 10:18 -0500, Sebastian Berg wrote: > On Wed, 2020-07-22 at 17:35 -0600, Aaron Meurer wrote: > > > About your warnings, do you have a nice way to do that? The > > > mechanism > > > for warnings does not really give a good way to catch that a >

Re: [Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-27 Thread Sebastian Berg
On Sun, 2020-07-26 at 17:31 +0100, Kevin Sheppard wrote: > Better would be to have an object like NamedTuple in typing that > would allow > > class Point(DType): > x: np.int16 > y: np.int16 > I agree with this type of use case (whatever the syntax is). But I think there are too many smal

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-08-04 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday Agust 5th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Desc

Re: [Numpy-discussion] New random.Generator method: permuted

2020-08-05 Thread Sebastian Berg
On Mon, 2020-08-03 at 14:09 -0400, Warren Weckesser wrote: > In one of the previous weekly zoom meetings, it was suggested > to ping the mailing list about an updated PR that implements > the `permuted` method for the Generator class in numpy.random. > The relevant issue is > > https://github.

[Numpy-discussion] Experimental `like=` attribute for array creation functions

2020-08-10 Thread Sebastian Berg
Hi all, as a heads up that Peter Entschev has a PR open to add `like=` to most array creation functions, my current plan is to merge it soon as a preliminary API and bring it up again before the actual release (in a few months). This allows overriding for array-likes, e.g. it will allow:

Re: [Numpy-discussion] Experimental `like=` attribute for array creation functions

2020-08-10 Thread Sebastian Berg
> Best regards, > Hameer Abbasi > > -- > Sent from Canary (https://canarymail.io) > > > On Monday, Aug 10, 2020 at 5:31 PM, Sebastian Berg < > > sebast...@sipsolutions.net (mailto:sebast...@sipsolutions.net)> > > wrote: > > Hi all, > > > &g

[Numpy-discussion] NumPy Development Meeting Today - Triage Focus

2020-08-11 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, August 12th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us

Re: [Numpy-discussion] Experimental `like=` attribute for array creation functions

2020-08-13 Thread Sebastian Berg
On Thu, 2020-08-13 at 15:47 +0200, Peter Andreas Entschev wrote: > > We adapted the NEP template [6] several times last year to try and > > improve this. And specified in there as well that NEP content set > > to the mailing list should only contain the sections: Abstract, > > Motivation and Scope,

Re: [Numpy-discussion] Use of booleans in slices

2020-08-14 Thread Sebastian Berg
This is because slicing with a boolean has just no confusing meaning I can think of [1]. NumPy even used to reject it, but there seems no reason to add maintenance/code complexity (i.e. duplicate code from Python already provides) to reject bools. There used to be a reason to using `__index__()` i

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-08-18 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday Agust 19th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Desc

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-08-19 Thread Sebastian Berg
On Wed, 2020-08-19 at 18:07 -0600, Aaron Meurer wrote: > > > 3. If you have multiple advanced indexing you get annoying > > > broadcasting > > >of all of these. That is *always* confusing for boolean > > > indices. > > >0-D should not be too special there... > > OK, now that I am learning

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-08-19 Thread Sebastian Berg
On Wed, 2020-08-19 at 19:37 -0600, Aaron Meurer wrote: > These cases don't give any deprecation warnings in NumPy master: > > > > > np.arange(0)[np.array([0]), False] > array([], dtype=int64) > > > > np.arange(0).reshape((0, 0))[np.array([0]), np.array([], > > > > dtype=int)] > array([], dtype=int

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-08-20 Thread Sebastian Berg
, is that I tried to do be minimal in the changes when I rewrote advanced indexing (and generalized boolean scalars correctly) long ago. That was likely the right start/choice at the time, since there were much bigger fish to catch, but I do not think anything is holding us back now. Cheers, Sebastian >

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-08-20 Thread Sebastian Berg
On Thu, 2020-08-20 at 16:50 -0500, Sebastian Berg wrote: > On Thu, 2020-08-20 at 12:21 -0600, Aaron Meurer wrote: > > You're right. I was confusing the broadcasting logic for boolean > > arrays. > > > > However, I did find this example > > > > > &g

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-08-20 Thread Sebastian Berg
ho may have found a use for this type of nugget to use `np.nonzero()` or find another solution. - Sebastian > > Aaron Meurer > > On Thu, Aug 20, 2020 at 3:56 PM Sebastian Berg > wrote: > > On Thu, 2020-08-20 at 16:50 -0500, Sebastian Berg wrote: > > > On Thu, 2020-

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-08-20 Thread Sebastian Berg
On Thu, 2020-08-20 at 17:08 -0600, Aaron Meurer wrote: > On Thu, Aug 20, 2020 at 4:38 PM Sebastian Berg > wrote: > > On Thu, 2020-08-20 at 16:00 -0600, Aaron Meurer wrote: > > > Just to be clear, what exactly do you think should be deprecated? > > > Boolean scal

Re: [Numpy-discussion] Why does fancy indexing work like this?

2020-08-24 Thread Sebastian Berg
On Mon, 2020-08-24 at 15:31 -0600, Aaron Meurer wrote: > On Wed, Aug 19, 2020 at 8:18 PM Sebastian Berg > wrote: > > On Wed, 2020-08-19 at 19:37 -0600, Aaron Meurer wrote: > > > These cases don't give any deprecation warnings in NumPy master: > > > > >

[Numpy-discussion] NumPy Development Meeting Today - Triage Focus

2020-08-25 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, August 26th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-09-01 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 2nd at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc

[Numpy-discussion] NumPy Development Meeting Today - Triage Focus

2020-09-08 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, September 9th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify u

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-09-15 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 16th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.as

Re: [Numpy-discussion] PR 14700

2020-09-21 Thread Sebastian Berg
On Mon, 2020-09-21 at 12:49 -0500, Lee Johnston wrote: > Hi, PR 14700 that adds > datetime64 and timedelta64 support to linspace has not been worked on > since > December 2019. I would like this feature sooner rather than never and > have > implemented t

[Numpy-discussion] NumPy Development Meeting Today - Triage Focus

2020-09-22 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, September 9th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify u

Re: [Numpy-discussion] Request for comments on PEP 637 - Support for indexing with keyword arguments

2020-09-24 Thread Sebastian Berg
On Wed, 2020-09-23 at 21:41 -0700, Stephan Hoyer wrote: > On Wed, Sep 23, 2020 at 2:22 PM Stefano Borini < > stefano.bor...@gmail.com> > wrote: > > > Hi Stefano -- thanks for pushing this proposal forward! I am sure > that > support for keyword indexing will be very welcome in the scientific >

Re: [Numpy-discussion] datetime64/timedelta64 support in linspace

2020-09-29 Thread Sebastian Berg
On Sat, 2020-09-26 at 09:52 -0500, Lee Johnston wrote: > I propose adding support for datetime64/timedelta64 in linspace and > solicit > feedback on the feature. As is, linspace raises UFuncTypeError when > parameters start and stop are datetime64/timedelta64. The > complementary > function arange

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-09-29 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 16th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.as

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-10-07 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, October 7th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of

[Numpy-discussion] Accepting NEP 42 — New and extensible DTypes

2020-10-08 Thread Sebastian Berg
Hi all, after another thorough revision of NEP 42 (much thanks to Ben!), I propose accepting the NEP, with the note that details are expected change. I am always happy to clarify and review the document based on feedback, but I feel the important technical points should be very clear and settled.

Re: [Numpy-discussion] NEP 42 and physical unit DType

2020-10-09 Thread Sebastian Berg
On Fri, 2020-10-09 at 07:48 -0500, Lee Johnston wrote: > NEP 42 mentions physical units as a possible use case for the new > DType. > Having worked on `unyt`, which is an ndarray subclass, and other unit > system implementations based on the dispatch mechanism, I am quite > familiar > with the chal

Re: [Numpy-discussion] Add sliding_window_view method to numpy

2020-10-12 Thread Sebastian Berg
of the PR. > > This PR implements a sliding window view based on stride tricks. > Following the discussion in issue #7753, a first implementation was > provided by Fanjin Zeng in PR #10771. After some discussion, that PR > stalled and I picked up the issue in the present PR

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-10-20 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, October 21st) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of

Re: [Numpy-discussion] help needed

2020-10-23 Thread Sebastian Berg
On Sat, 2020-10-24 at 01:50 +0800, Amardeep Singh wrote: > Hi All > > I am a new joiner.Using macbook. > Can someone please guide me how to debug numpy using clion? > I am able to build not sure about debugging the c code. > > ProductName: Mac OS X > > ProductVersion: 10.15.7 > > BuildVersion:

Re: [Numpy-discussion] Accepting NEP 42 — New and extensible DTypes

2020-10-27 Thread Sebastian Berg
Hi all, On Thu, 2020-10-08 at 07:51 -0500, Sebastian Berg wrote: > Hi all, > > after another thorough revision of NEP 42 (much thanks to Ben!), I > propose accepting the NEP, with the note that details are expected > change. > > I am always happy to clarify and review

[Numpy-discussion] NumPy Community Meeting Wednesday (1h difference for Europe due to daylight saving ending)

2020-10-27 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday October 27th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc De

Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-29 Thread Sebastian Berg
On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > For ndindex (https://quansight.github.io/ndindex/), the biggest issue > with the API is that to use an ndindex object to actually index an > array, you have to use a[idx.raw] instead of a[idx]. This is because > for NumPy arrays, you cannot a

Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-30 Thread Sebastian Berg
On Thu, 2020-10-29 at 23:58 -0600, Aaron Meurer wrote: > On Thu, Oct 29, 2020 at 6:09 PM Sebastian Berg > wrote: > > On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > > > For ndindex (https://quansight.github.io/ndindex/), the biggest > > > issue > &

Re: [Numpy-discussion] NumPy 1.20.x branch in two weeks

2020-11-02 Thread Sebastian Berg
On Mon, 2020-11-02 at 06:49 -0600, Juan Nunez-Iglesias wrote: > I like Ralf's email, and most of all I agree that the existing > wording is clearer. > > My view on the NEP is that it does not mandate dropping support, but > encourage it. In my projects I would drop it if I had use for Python > 3.7

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus (US switched times last week)

2020-11-03 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, November 4th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Sebastian Berg
On Tue, 2020-11-03 at 17:54 +0200, Matti Picus wrote: > Hi. On behalf of Quansight and RTOSHoldings, I would like to > introduce > "pnumpy", a package to speed up NumPy. > > https://quansight.github.io/numpy-threading-extensions/stable/index.html > Nice to see these efforts especially with inte

[Numpy-discussion] Officially drop Python 3.6 from NumPy 1.20 (was: NumPy 1.20.x branch in two weeks)

2020-11-05 Thread Sebastian Berg
ebody > > > were to make the PR, I (Juan) would support it. > > > > > > As for supporting PyPy: it already exists in the build matrix > > > AFAICT. > > > Breaking PyPy would be a deliberate action, as opposed to an > > > accidental

Re: [Numpy-discussion] Add sliding_window_view method to numpy

2020-11-05 Thread Sebastian Berg
ows the changed API as suggested > by > Eric Wieser. > > Code reviews have been provided by Bas van Beek, Stephen Hoyer, and > Eric > Wieser. Sebastian Berg added the "62 - Python API" label. > > > Do you think this is suitable for inclusion in numpy? > > D

Re: [Numpy-discussion] Add sliding_window_view method to numpy

2020-11-05 Thread Sebastian Berg
On Thu, 2020-11-05 at 12:51 -0800, Stephan Hoyer wrote: > On Thu, Nov 5, 2020 at 11:16 AM Ralf Gommers > wrote: > > > > > On Thu, Nov 5, 2020 at 4:56 PM Sebastian Berg < > > sebast...@sipsolutions.net> > > wrote: > > > > > Hi all, >

Re: [Numpy-discussion] Add sliding_window_view method to numpy

2020-11-05 Thread Sebastian Berg
On Thu, 2020-11-05 at 17:35 -0600, Sebastian Berg wrote: > On Thu, 2020-11-05 at 12:51 -0800, Stephan Hoyer wrote: > > On Thu, Nov 5, 2020 at 11:16 AM Ralf Gommers < > > ralf.gomm...@gmail.com> > > wrote: > > > > > On Thu, Nov 5, 2020 at 4:56 PM Sebasti

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-11-10 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday November 11th at 1pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc D

[Numpy-discussion] API, NEP: Inclusion of the experimental `like=` argument in NumPy 1.20 (we currently lean to yes)

2020-11-12 Thread Sebastian Berg
Hi all, TL;DR: Should NumPy add a `like=` to array creation functions? This is an extension of the `__array_function__` protocol useful when working with array-like objects other than NumPy arrays. Including it, effectively means we preliminarily accept NEP 35. Note that without any feedback here

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-11-17 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, November 18th) at 11 am Pacific Time (18:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us o

Re: [Numpy-discussion] Changing the size of PyArrayObject_fields (the ndarray c-struct)

2020-11-21 Thread Sebastian Berg
On Sat, 2020-11-21 at 14:42 -0700, Charles R Harris wrote: > On Sat, Nov 21, 2020 at 12:28 PM Matti Picus > wrote: > > > PyArrayObject_fields is the c-struct that underlies ndarray. It is > > defined in ndarraytypes.h [0]. Since version 1.7, we have been > > trying to > > hide it from the public

Re: [Numpy-discussion] Comment published in Nature Astronomy about The ecological impact of computing with Python

2020-11-24 Thread Sebastian Berg
On Tue, 2020-11-24 at 16:47 +0100, PIERRE AUGIER wrote: > Hi, > > I recently took a bit of time to study the comment "The ecological > impact of high-performance computing in astrophysics" published in > Nature Astronomy (Zwart, 2020, > https://www.nature.com/articles/s41550-020-1208-y, > https:

Re: [Numpy-discussion] Comment published in Nature Astronomy about The ecological impact of computing with Python

2020-11-24 Thread Sebastian Berg
On Tue, 2020-11-24 at 18:41 +0100, Jerome Kieffer wrote: > Hi Pierre, > > I agree with your point of view: the author wants to demonstrate C++ > and Fortran are better than Python... and environmentally speaking he > has some evidences. > > We develop with Python, Cython, Numpy, and OpenCL and wh

[Numpy-discussion] NumPy Community Meeting Wednesday -- One our earlier from now on!

2020-11-24 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday November 25th at 12pm Pacific Time (19:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-12-01 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, November 18th) at 11 am Pacific Time (19:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us o

[Numpy-discussion] Rules for argument parsing/forwarding in __array_function__ and __array_ufunc__

2020-12-02 Thread Sebastian Berg
Hi all, I am curious about the correct argument for "normalizing" and forwarding arguments in `__array_function__` and `__array_ufunc__`. I have listed the three rules as I understand how the "right" way is below. Mainly this is just to write down the rules that I think we should aim for in case

Re: [Numpy-discussion] problem with numpy 1.19.4 install via pip on Win 10

2020-12-02 Thread Sebastian Berg
On Thu, 2020-12-03 at 01:13 +0100, Ilhan Polat wrote: > Yes this is known and we are waiting MS to roll out a solution for > this. > Here are more details > https://developercommunity2.visualstudio.com/t/fmod-after-an-update-to-windows-2004-is-causing-a/1207405 I think one workaround was `pip ins

Re: [Numpy-discussion] Rules for argument parsing/forwarding in __array_function__ and __array_ufunc__

2020-12-04 Thread Sebastian Berg
Dec 2, 2020, at 15:34, Sebastian Berg wrote: > > 1. If an argument is invalid in NumPy it is considered and error. > >For example: > > > >np.log(arr, my_weird_argument=True) > > > >is always an error even if the `__array_function__` > > implementa

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-06 Thread Sebastian Berg
On Sat, 2020-12-05 at 20:12 -0700, Charles R Harris wrote: > On Sat, Dec 5, 2020 at 4:31 PM Juan Nunez-Iglesias > wrote: > > > Hi all, > > > > At the prodding [1] of Sebastian, I’m starting a discussion on the > > decision to deprecate np.{bool,float,int}. This deprecation broke > > our > > prer

Re: [Numpy-discussion] Rules for argument parsing/forwarding in __array_function__ and __array_ufunc__

2020-12-06 Thread Sebastian Berg
On Sat, 2020-12-05 at 22:05 -0800, Stephan Hoyer wrote: > On Wed, Dec 2, 2020 at 3:39 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > 1. If an argument is invalid in NumPy it is considered and error. > >For example: > > > >

[Numpy-discussion] NEP 42 being accepted (New and extensible DTypes)

2020-12-07 Thread Sebastian Berg
Hi all, It has been a very long time since my emails asking to accept the NEP: https://mail.python.org/pipermail/numpy-discussion/2020-October/081038.html Happy to wait for a bit longer, but without any hesitation/points raised, I consider the NEP as accepted. At this time most of the impo

[Numpy-discussion] NumPy Community Meeting Wednesday

2020-12-08 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday December 9th at 12pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc

[Numpy-discussion] Fixing/implementing value based Casting

2020-12-09 Thread Sebastian Berg
Hi all, Sorry that this will again be a bit complicated again :(. In brief: * I would like to pass around scalars in some (partially new) C-API to implement value-based promotion. * There are some subtle commutativity issues with promotion. Commutativity may change in that case (with respect

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-09 Thread Sebastian Berg
On Mon, 2020-12-07 at 14:18 -0700, Aaron Meurer wrote: > Regarding np.bool specifically, if you want to deprecate this, you > might want to discuss this with us at the array API standard > https://github.com/data-apis/array-api (which is currently in RFC > stage). The spec uses bool as the name for

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-10 Thread Sebastian Berg
On Wed, 2020-12-09 at 13:37 -0800, Stephan Hoyer wrote: > On Wed, Dec 9, 2020 at 1:07 PM Aaron Meurer > wrote: > > > On Wed, Dec 9, 2020 at 9:41 AM Sebastian Berg > > wrote: > > > > > > On Mon, 2020-12-07 at 14:18 -0700, Aaron Meurer wrote: > > &g

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-10 Thread Sebastian Berg
On Thu, 2020-12-10 at 20:38 +0100, Ralf Gommers wrote: > On Thu, Dec 10, 2020 at 7:25 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > On Wed, 2020-12-09 at 13:37 -0800, Stephan Hoyer wrote: > > > On Wed, Dec 9, 2020 at 1:07 PM Aaron Meurer > &

Re: [Numpy-discussion] Fixing/implementing value based Casting

2020-12-11 Thread Sebastian Berg
On Fri, 2020-12-11 at 12:09 +0100, Ralf Gommers wrote: > On Wed, Dec 9, 2020 at 5:22 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > Hi all, > > > > Sorry that this will again be a bit complicated again :(. In brief: > > > &g

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-11 Thread Sebastian Berg
On Fri, 2020-12-11 at 11:35 +0100, Ralf Gommers wrote: > On Thu, Dec 10, 2020 at 9:00 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > Just deprecation `np.int` may make sense. That will already raise > awareness, and leaving `np.float` as-is may preve

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-12 Thread Sebastian Berg
On Sat, 2020-12-12 at 12:34 +1100, Juan Nunez-Iglesias wrote: > > > I agree. I think we should recommend sane, descriptive names that > > do the right thing. So ideally we'd have people spell their dtype > > specifiers as > >   dtype=bool  # or np.bool > >   dtype=np.float64 > >   dtype=np.int64 >

Re: [Numpy-discussion] np.{bool,float,int} deprecation

2020-12-13 Thread Sebastian Berg
On Sun, 2020-12-13 at 19:00 +1100, Juan Nunez-Iglesias wrote: > > > > On 13 Dec 2020, at 6:25 am, Sebastian Berg < > > sebast...@sipsolutions.net> wrote: > > > > But "default" in NumPy really doesn't mean a whole lot?  I can > > think of

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-12-15 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is today (Wednesday, November 18th) at 11 am Pacific Time (19:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us o

Re: [Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2020-12-15 Thread Sebastian Berg
On Tue, 2020-12-15 at 13:45 -0600, Sebastian Berg wrote: > Hi all, > > Our bi-weekly triage-focused NumPy development meeting is today > (Wednesday, November 18th) at 11 am Pacific Time (19:00 UTC). Maybe I won't forget to update this next time. Of course tomorrow December 16th

Re: [Numpy-discussion] updated backwards compatibility and deprecation policy NEP

2020-12-30 Thread Sebastian Berg
On Wed, 2020-12-30 at 16:27 +0100, Ralf Gommers wrote: > On Wed, Dec 30, 2020 at 4:05 PM Ilhan Polat > wrote: > > > Hi Ralf, > > > > This reads really nice. Thanks to everyone who contributed. > > > > Before nitpicking here and there, and sticking my head for others, > > is this > > is a finish

Re: [Numpy-discussion] updated backwards compatibility and deprecation policy NEP

2021-01-01 Thread Sebastian Berg
On Wed, 2020-12-30 at 11:43 -0600, Sebastian Berg wrote: > On Wed, 2020-12-30 at 16:27 +0100, Ralf Gommers wrote: > > > > That's very hard to describe, since it relies so much on previous > > experience and qualitative judgements. That's the main reason why I &

Re: [Numpy-discussion] updated backwards compatibility and deprecation policy NEP

2021-01-02 Thread Sebastian Berg
On Sat, 2021-01-02 at 18:06 +0100, Ralf Gommers wrote: > On Sat, Jan 2, 2021 at 3:55 AM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > On Wed, 2020-12-30 at 11:43 -0600, Sebastian Berg wrote: > > > > On Wed, 2020-12-3

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-01-05 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday January 6th at 12pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc D

[Numpy-discussion] NEP 43 – How should ufunc (inner loops) be designed?

2021-01-07 Thread Sebastian Berg
Hi all, I would like to nudge a discuss on NEP 43. Right now, mainly the first part: That is everything up to "Promotion and dispatching". (This is because promotion and dispatching should be the last bigger step in refactoring NumPy.) The full text is at: https://numpy.org/neps/nep-0043-extensib

Re: [Numpy-discussion] How to speed up array generating

2021-01-09 Thread Sebastian Berg
On Sat, 2021-01-09 at 23:45 +0300, klark--k...@yandex.ru wrote: > np.meshgrid, indexing, reshape I would expect e.g. reshape helps if you make use of the fact that this is very clear in 2-D. The other thing is ensuring to use the methods `arr.reshape`, `arr.repeat`, which avoids overheads (some of

Re: [Numpy-discussion] using scalar input on np.PyArray_MultiIterNew2

2021-01-10 Thread Sebastian Berg
On Sun, 2021-01-10 at 09:59 -0700, zoj613 wrote: > Hi all, > > I am looking for a way to use `np.PyArray_MultiIterNew2` in Cython to > broadcast parameters of a function. The requirement is that the two > arguments can be scalar and/or sequences. Using the usual > `np.broadcast` > function works w

Re: [Numpy-discussion] using scalar and tuple/list input on np.PyArray_MultiIterNew2

2021-01-11 Thread Sebastian Berg
On Sun, 2021-01-10 at 14:18 -0700, zoj613 wrote: > For what it's worth, I ended up defining a function like: > cdef np.broadcast broadcast(object a, object b): >     """ >     Broadcast the inputs into a multiIterator object. >     the input can be a scalar, list, tuple or numpy array or > array_li

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-01-12 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, Jan 13th) at 11 am Pacific Time (19:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of

Re: [Numpy-discussion] Subclassing vs. dispatch

2021-01-15 Thread Sebastian Berg
On Fri, 2021-01-15 at 18:38 +, Israel, Daniel M wrote: > I hope this is the right place to post this. > > The numpy documentation talks about two methods for making ndarray- > like objects, subclassing and dispatching, but it is not clear to me > which one is most appropriate for which purpose

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-01-19 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday January 20th at 12pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc

[Numpy-discussion] Value based promotion and user DTypes

2021-01-25 Thread Sebastian Berg
Hi all, does anyone have a thought about how user DTypes (i.e. DTypes not currently part of NumPy) should interact with the "value based promotion" logic we currently have? For now I can just do anything, and we will find out later. And I will have to do something for now, basically with the hope

Re: [Numpy-discussion] Value based promotion and user DTypes

2021-01-26 Thread Sebastian Berg
On Tue, 2021-01-26 at 06:11 +0100, Ralf Gommers wrote: > On Tue, Jan 26, 2021 at 2:01 AM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > Hi all, > > > > does anyone have a thought about how user DTypes (i.e. DTypes not > > currently part

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-01-26 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, Jan 27th at 11 am Pacific Time (19:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or P

Re: [Numpy-discussion] Value based promotion and user DTypes

2021-01-27 Thread Sebastian Berg
On Wed, 2021-01-27 at 10:33 +0100, Ralf Gommers wrote: > On Tue, Jan 26, 2021 at 10:21 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > Thanks for all the other comments, they are helpful. I am considering writing a (hopefully short) NEP, to define the directio

Re: [Numpy-discussion] Value based promotion and user DTypes

2021-01-27 Thread Sebastian Berg
On Wed, 2021-01-27 at 18:16 +0100, Ralf Gommers wrote: > On Wed, Jan 27, 2021 at 5:44 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > On Wed, 2021-01-27 at 10:33 +0100, Ralf Gommers wrote: > > > On Tue, Jan 26, 2021 at 10:21 PM Sebastian Berg &

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-02-02 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday February 3rd at 12pm Pacific Time (20:00 UTC). Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc

Re: [Numpy-discussion] Question about optimizing random_standard_normal

2021-02-08 Thread Sebastian Berg
On Mon, 2021-02-08 at 16:36 +, Kevin Sheppard wrote: > That is good news indeed.  Seems like a good upgrade, especially > given the breadth of application of normals and the multiple > appearances within distributions.c (e.g., Cauchy). Is there a > deprecation for a change like this? Or is it j

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-02-09 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, Feb 10th at 11 am Pacific Time (19:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or P

Re: [Numpy-discussion] ENH: Proposal to add atleast_nd function

2021-02-10 Thread Sebastian Berg
On Wed, 2021-02-10 at 17:31 -0500, Joseph Fox-Rabinovitz wrote: > I've created PR#18386 to add a function called atleast_nd to numpy > and > numpy.ma. This would generalize the existing atleast_1d, atleast_2d, > and > atleast_3d functions. > > I proposed a similar idea about four and a half years

<    1   2   3   4   5   6   7   >