Re: [Numpy-discussion] Perf regression with Pythran between Numpy 0.19.5 and 0.20 (commit 4cd6e4b336fbc68d88c0e9bc45a435ce7b721f1f, ENH: implement NEP-35's `like=` argument)

2021-03-15 Thread Peter Andreas Entschev
Hi Pierre, Thanks for pinging me. To put it in the simplest way possible, that PR adds a new `like` kwarg that will dispatch to downstream libraries using `__array_function__` when specified, otherwise fallback to the default behavior of NumPy. While that introduces an extra check on the C side, t

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

2020-08-17 Thread Peter Andreas Entschev
ion__ === :Author: Peter Andreas Entschev :Status: Draft :Type: Standards Track :Created: 2019-10-15 :Updated: 2020-08-17 :Resolution: Abstract We propose the introduction of a new keyword argument ``like=`` to all array creation functions, this argument permit

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

2020-08-14 Thread Peter Andreas Entschev
NEP 35 >> simply follows the pattern set by previous PRs, and given its tight scope >> is less difficult to understand than other NEPs on such technical topics. >> Peter has done a lot of things right, and is close to the finish line. >> >> >> On Thu, Aug 13, 202

[Numpy-discussion] NEP Procedure Discussion

2020-08-14 Thread Peter Andreas Entschev
Hi all, During the discussion about NEP-35, there have been lots of discussions around the NEP process itself. In the interest of allowing people who are mostly interested in this discussion and to avoid drifting so much off-topic in that thread, I'm starting this new thread to discuss the NEP pro

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

2020-08-13 Thread Peter Andreas Entschev
discussion of the NEP process in a different thread if people wish to do so. Best, Peter On Thu, Aug 13, 2020 at 4:13 PM Ralf Gommers wrote: > > > > On Thu, Aug 13, 2020 at 2:47 PM Peter Andreas Entschev > wrote: >> >> > We adapted the NEP template [6] several tim

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

2020-08-13 Thread Peter Andreas Entschev
this clarifies a few things that I failed to convey in my > previous mail. > ilhan > > > > On Thu, Aug 13, 2020 at 2:23 PM Ralf Gommers wrote: >> >> Thanks for raising these concerns Ilhan and Juan, and for answering Peter. >> Let me give my perspective as we

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

2020-08-13 Thread Peter Andreas Entschev
> Let me give my perspective as well. > > To start with, this is not specifically about Peter's NEP and PR. NEP 35 > simply follows the pattern set by previous PRs, and given its tight scope is > less difficult to understand than other NEPs on such technical topics. Peter &

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

2020-08-13 Thread Peter Andreas Entschev
> I am not sure adding a new keyword to an already confusing function is the > right thing to do. Could you clarify what is the confusing function in question? > This is already a very (I mean extremely very) easy keyword name to confuse > with ones_like, zeros_like and by its nature any other

[Numpy-discussion] NEP 33 — Array Creation Dispatching With __array_function__

2019-10-15 Thread Peter Andreas Entschev
Hello everyone, I've put together a new proposal for array creation dispatching with the __array_function__ protocol [1], based on a discussion that occurred some time ago in [2]. It would be great if people could take the time to review and comment on that. [1] https://github.com/numpy/numpy/pu

Re: [Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-09-17 Thread Peter Andreas Entschev
I see what you mean now. It was my misunderstanding, I thought you wanted to return a call to __array__ when you call np.duckarray. I agree with your point and understand how the current text may be misleading, so we shall make it clearer in the NEP (as done in https://github.com/numpy/numpy/pull/

Re: [Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-09-16 Thread Peter Andreas Entschev
array (e.g., the original array passed to the duckarray function) or an exception (instead of coercing to a NumPy array)? On Mon, Sep 16, 2019 at 9:25 PM Chris Barker wrote: > > > > On Mon, Aug 12, 2019 at 4:02 AM Peter Andreas Entschev > wrote: >> >> Apologies for t

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

2019-09-16 Thread Peter Andreas Entschev
> > My preference, would be to use "numpy", and where practicable, use a > "computer" font -- i.e. ``numpy`` in RST. > > But if there is consensus already for anything else, that's fine, I'd just > like to know what it is. > > -CHB > > >

Re: [Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-08-12 Thread Peter Andreas Entschev
Apologies for the late reply. I've opened a new PR https://github.com/numpy/numpy/pull/14257 with the changes requested on clarifying the text. After reading the detailed description, I've decided to add a subsection "Scope" to clarify the scope where NEP-30 would be useful. I think the inclusion o

Re: [Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-08-06 Thread Peter Andreas Entschev
e can then sync both NEPs. On Tue, Aug 6, 2019 at 4:23 PM Sebastian Berg wrote: > > On Tue, 2019-08-06 at 10:24 +0200, Peter Andreas Entschev wrote: > > Thanks for the concerns raised, and Stephan for promptly answering > > them. > > > > > An alternative to

Re: [Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-08-06 Thread Peter Andreas Entschev
Thanks for the concerns raised, and Stephan for promptly answering them. > An alternative to introducing np.duckarray() would be to just modify > np.asarray(). Of course this has backwards compatibility impact, but if > you're going to be raising a TypeError from __array__ then that impact is >

[Numpy-discussion] NEP 30 - Duck Typing for NumPy Arrays - Implementation

2019-08-05 Thread Peter Andreas Entschev
Hi, we have a new proposal for the implementation of NumPy array duck typing [1] [2], following the high-level overview described in NEP-22 [3]. Would be great to get some comments on that. [1] https://github.com/numpy/numpy/blob/master/doc/neps/nep-0030-duck-array-protocol.rst [2] https://gith