Re: [Numpy-discussion] __numpy_ufunc__

2017-02-22 Thread Marten van Kerkwijk
HI Stephan, Indeed, `__array_ufunc__` is None would be for classes that interact with arrays only as if they were any other numeric type, and thus have no use for ufuncs, but may need normal operations (astropy's `Unit` class is a reasonably good example). Your example also makes clear that,

Re: [Numpy-discussion] __numpy_ufunc__

2017-02-22 Thread Stephan Hoyer
On Wed, Feb 22, 2017 at 6:31 AM, Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > It seems to me entirely logical (but then it would, I suggested it > before...) that we allow opting out by setting `__array_ufunc__` to > None; in that case, binops return NotImplemented and ufuncs raise >

Re: [Numpy-discussion] __numpy_ufunc__

2017-02-22 Thread Marten van Kerkwijk
Hi All, I'd very much like to get `__array_ufunc__` in, and am willing to do some work, but fear we need to get past the last sticking point. As I noted in Chuck's PR [1], in python 3.6 there is now an explicit language change [2], which I think is relevant: ``` It is now possible to set a

Re: [Numpy-discussion] __numpy_ufunc__

2016-11-07 Thread Charles R Harris
On Mon, Nov 7, 2016 at 1:08 AM, Ralf Gommers wrote: > > > On Mon, Nov 7, 2016 at 9:10 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sun, Nov 6, 2016 at 11:44 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> Hi All, >>> >>> For

Re: [Numpy-discussion] __numpy_ufunc__

2016-11-07 Thread Ralf Gommers
On Mon, Nov 7, 2016 at 9:21 AM, Nathan Goldbaum wrote: > I'm interested in this, but was never able to dive in to the lengthy > discussions on this. I'm curious if there is a summary of the current > state of things somewhere that I could read to catch up. Old proposal,

Re: [Numpy-discussion] __numpy_ufunc__

2016-11-07 Thread Ralf Gommers
On Mon, Nov 7, 2016 at 9:10 AM, Charles R Harris wrote: > > > On Sun, Nov 6, 2016 at 11:44 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> For those interested in continuing the __numpy_ufunc__ saga, there is a pull >> request enabling it

Re: [Numpy-discussion] __numpy_ufunc__

2016-11-06 Thread Nathan Goldbaum
I'm interested in this, but was never able to dive in to the lengthy discussions on this. I'm curious if there is a summary of the current state of things somewhere that I could read to catch up. On Sunday, November 6, 2016, Charles R Harris wrote: > > > On Sun, Nov

Re: [Numpy-discussion] __numpy_ufunc__

2016-11-06 Thread Charles R Harris
On Sun, Nov 6, 2016 at 11:44 AM, Charles R Harris wrote: > Hi All, > > For those interested in continuing the __numpy_ufunc__ saga, there is a pull > request enabling it . Likely we > will want to make some changes up front

[Numpy-discussion] __numpy_ufunc__

2016-11-06 Thread Charles R Harris
Hi All, For those interested in continuing the __numpy_ufunc__ saga, there is a pull request enabling it . Likely we will want to make some changes up front before merging that, so some discussion is in order. Chuck

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-31 Thread Marten van Kerkwijk
Hi Chuck, > We were pretty close. IIRC, the outstanding issue was some sort of override. Correct. With a general sentiment of those downstream that it would be great to merge in any form, as it will be really helpful! (Generic speedup of factor of 2 for computationally expensive ufuncs (sin,

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-31 Thread Charles R Harris
On Mon, Oct 31, 2016 at 11:39 AM, Stephan Hoyer wrote: > Recall that I think we wanted to rename this to __array_ufunc__, so we > could change the function signature: https://github.com/numpy/ > numpy/issues/5986 > > I'm still a little nervous about this. Chunk -- what is your

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-31 Thread Stephan Hoyer
Recall that I think we wanted to rename this to __array_ufunc__, so we could change the function signature: https://github.com/numpy/numpy/issues/5986 I'm still a little nervous about this. Chunk -- what is your proposal for resolving the outstanding issues from

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-31 Thread Charles R Harris
On Mon, Oct 31, 2016 at 11:08 AM, Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi Chuck, > > I've revived my Quantity PRs that use __numpy_ufunc__ but is it > correct that at present in *dev, one cannot use it? > It's not enabled yet. Chuck

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-31 Thread Marten van Kerkwijk
Hi Chuck, I've revived my Quantity PRs that use __numpy_ufunc__ but is it correct that at present in *dev, one cannot use it? All the best, Marten ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-30 Thread Marten van Kerkwijk
> The __numpy_ufunc__ functionality is the last bit I want for 1.12.0, the > rest of the remaining changes I can kick forward to 1.13.0. I will start > taking a look tomorrow, probably starting with Nathaniel's work. Great! I'll revive the Quantity PRs that implement __numpy_ufunc__! -- Marten

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-29 Thread Charles R Harris
On Sat, Oct 29, 2016 at 7:03 PM, Stephan Hoyer wrote: > I'm happy to revisit the __numpy_ufunc__ discussion (I still want to see > it happen!), but I don't recall scalars being a point of contention. > The __numpy_ufunc__ functionality is the last bit I want for 1.12.0, the

Re: [Numpy-discussion] __numpy_ufunc__

2016-10-29 Thread Stephan Hoyer
I'm happy to revisit the __numpy_ufunc__ discussion (I still want to see it happen!), but I don't recall scalars being a point of contention. The obvious thing to do with scalars would be to treat them the same as 0-dimensional arrays, though I might be missing some nuance... On Sat, Oct 29,

[Numpy-discussion] __numpy_ufunc__

2016-10-29 Thread Charles R Harris
Hi All, Does anyone remember discussion of numpy scalars apropos __numpy_ufunc__? Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-23 Thread Julian Taylor
On 15.07.2014 20:06, Julian Taylor wrote: hi, as you may know we want to release numpy 1.9 soon. We should have solved most indexing regressions the first beta showed. The remaining blockers are finishing the new __numpy_ufunc__ feature. This feature should allow for alternative method to

Re: [Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-23 Thread Pauli Virtanen
23.07.2014, 20:37, Julian Taylor kirjoitti: [clip: __numpy_ufunc__] So its been a week and we got a few answers and new issues. To summarize: - to my knowledge no progress was made on the issues - scipy already has a released version using the current implementation - no very loud objections

[Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-18 Thread Julian Taylor
hi, as you may know we want to release numpy 1.9 soon. We should have solved most indexing regressions the first beta showed. The remaining blockers are finishing the new __numpy_ufunc__ feature. This feature should allow for alternative method to overriding the behavior of ufuncs from

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-18 Thread Charles R Harris
On Wed, Jul 16, 2014 at 12:53 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Wed, Jul 16, 2014 at 10:07 AM, Nathaniel Smith n...@pobox.com wrote: Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? Also weirdly, my reply didn't show up

Re: [Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-18 Thread Charles R Harris
On Wed, Jul 16, 2014 at 11:16 AM, Pauli Virtanen p...@iki.fi wrote: Hi, 15.07.2014 21:06, Julian Taylor kirjoitti: [clip: __numpy_ufunc__] So I'm wondering if we should delay the introduction of this feature to 1.10 or is it important enough to wait until there is a consensus on the

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-17 Thread Sebastian Berg
On Mi, 2014-07-16 at 09:07 +0100, Nathaniel Smith wrote: Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? I send some mails yesterday and they never arrived... Not sure if it is a problem on my side or not. I also am not sure what/where

Re: [Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-17 Thread Pauli Virtanen
Hi, 15.07.2014 21:06, Julian Taylor kirjoitti: [clip: __numpy_ufunc__] So I'm wondering if we should delay the introduction of this feature to 1.10 or is it important enough to wait until there is a consensus on the remaining issues? My 10c: The feature is not so much in hurry that it alone

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-16 Thread Nathaniel Smith
Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? I also am not sure what/where Julian's comments were, so I second the call for context :-). Putting it off until 1.10 doesn't seem like an obviously bad idea to me, but specifics would help...

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-16 Thread Ralf Gommers
On Mon, Jul 14, 2014 at 8:22 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, Julian has raised the question of including numpy_ufunc in numpy 1.9. I don't feel strongly one way or the other, but it doesn't seem to be finished yet and 1.10 might be a better place to work out

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-16 Thread Benjamin Root
Perhaps a bit of context might be useful? How is numpy_ufunc different from the ufuncs that we know and love? What are the known implications? What are the known shortcomings? Are there ABI and/or API concerns between 1.9 and 1.10? Ben Root On Mon, Jul 14, 2014 at 2:22 PM, Charles R Harris

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-16 Thread Ralf Gommers
On Wed, Jul 16, 2014 at 10:07 AM, Nathaniel Smith n...@pobox.com wrote: Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? Also weirdly, my reply didn't show up on gmane. Not sure if it got through, so re-sending: It's already in, so do you

[Numpy-discussion] __numpy_ufunc__

2014-07-15 Thread Charles R Harris
Hi All, Julian has raised the question of including numpy_ufunc in numpy 1.9. I don't feel strongly one way or the other, but it doesn't seem to be finished yet and 1.10 might be a better place to work out the remaining problems along with the astropy folks testing possible uses. Thoughts?