[Numpy-discussion] [ANN] SolarUtils-0.3 released - wrappers for NREL SOLPOS and SPECTRL2 algorithms

2019-05-23 Thread Mark Mikofski
This update adds two convenience functions: 1. get_solposAM(location, datetimes, weather) - returns solar positions and airmass for arbitrary sequence of datetime vectors [year, month, day, hour, minute second]. 2. get_solpos8760(location, year, weather) - returns 8760 annyual hourly

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Ralf Gommers
On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > If we want to keep an "off" switch we might want to add some sort of API >> for exposing whether NumPy is using __array_function__ or not. Maybe >> numpy.__experimental_array_function_enabled__ = True, so y

Re: [Numpy-discussion] Converting np.sinc into a ufunc

2019-05-23 Thread Ralf Gommers
On Thu, May 23, 2019 at 3:24 AM Charles R Harris wrote: > > > On Wed, May 22, 2019 at 7:14 PM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> On a more general note, if we change to a ufunc, it will get us stuck >> with sinc being the normalized version, where the units of the inpu

Re: [Numpy-discussion] Converting np.sinc into a ufunc

2019-05-23 Thread Marten van Kerkwijk
I agree that we should not have two functions I also am rather unsure whether a ufunc is a good idea. Earlier, while discussing other possible additions, like `erf`, the conclusion seemed to be that in numpy we should just cover whatever is in the C standard. This suggests `sinc` should not be a u

Re: [Numpy-discussion] Converting np.sinc into a ufunc

2019-05-23 Thread Robert Kern
On Thu, May 23, 2019 at 7:20 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > I agree that we should not have two functions > > I also am rather unsure whether a ufunc is a good idea. Earlier, while > discussing other possible additions, like `erf`, the conclusion seemed to > be that i

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Stephan Hoyer
On Thu, May 23, 2019 at 2:43 AM Ralf Gommers wrote: > > > On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> >> If we want to keep an "off" switch we might want to add some sort of API >>> for exposing whether NumPy is using __array_function__ or not. M

Re: [Numpy-discussion] Converting np.sinc into a ufunc

2019-05-23 Thread Sebastian Berg
On Thu, 2019-05-23 at 10:17 -0400, Marten van Kerkwijk wrote: > I agree that we should not have two functions > > I also am rather unsure whether a ufunc is a good idea. Earlier, > while discussing other possible additions, like `erf`, the conclusion > seemed to be that in numpy we should just cov

[Numpy-discussion] __skip_array_function__ discussion summary

2019-05-23 Thread Sebastian Berg
Hi all, This is an attempt from me to wrap up the discussion a bit so that others can chime in if they want to. NumPy 1.17 will ship with `__array_function__` a way for array like projects (dask, cupy) to override almost all numpy functions [0]. This addition is uncontroversial. NumPy 1.17 will _

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Hameer Abbasi
On Thu, 2019-05-23 at 10:19 -0700, Stephan Hoyer wrote: > On Thu, May 23, 2019 at 2:43 AM Ralf Gommers > wrote: > > On Thu, May 23, 2019 at 3:02 AM Marten van Kerkwijk < > > m.h.vankerkw...@gmail.com> wrote: > > > > If we want to keep an "off" switch we might want to add some > > > > sort of API f

Re: [Numpy-discussion] Keep __array_function__ unexposed by default for 1.17?

2019-05-23 Thread Hameer Abbasi
On Wed, 2019-05-22 at 08:52 -0700, Stephan Hoyer wrote: > Thanks for raising these concerns. > The full implications of my recent __skip_array_function__ proposal > are only now becoming evident to me now, looking at it's use in GH- > 13585. Guaranteeing that it does not expand NumPy's API surface

Re: [Numpy-discussion] __skip_array_function__ discussion summary

2019-05-23 Thread Stefan van der Walt
On Thu, 23 May 2019 14:33:17 -0700, Sebastian Berg wrote: > Those two options further have very different goals in mind for the > final usage of the protocol. So that right now the solution is to step > back, not include the addition and rather gain experience with the > NumPy 1.17 release that inc

Re: [Numpy-discussion] __skip_array_function__ discussion summary

2019-05-23 Thread Marten van Kerkwijk
Hi Sebastian, Stéfan, Thanks for the very good summaries! An additional item worth mentioning is that by using `__skip_array_function__` everywhere inside, one minimizes the performance penalty of checking for `__array_function__`. It would obviously be worth trying to do that, but ideally in a w