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

2020-12-13 Thread Ralf Gommers
On Sun, Dec 13, 2020 at 7:29 PM Sebastian Berg wrote: > 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 > >

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 > > three places where "defaults" exists: > > Huh? There

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

2020-12-13 Thread Juan Nunez-Iglesias
> On 13 Dec 2020, at 6:25 am, Sebastian Berg wrote: > > But "default" in NumPy really doesn't mean a whole lot? I can think of > three places where "defaults" exists: Huh? There are platform-specific defaults for literally every array creation function in NumPy? In [1]: np.array([4, 9]).dty

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-11 Thread Juan Nunez-Iglesias
> 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 > dtype=np.complex128 > The names with underscores at the end make little se

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

2020-12-11 Thread Robert Kern
On Fri, Dec 11, 2020 at 1:12 PM Aaron Meurer wrote: > On Fri, Dec 11, 2020 at 1:47 AM Eric Wieser > wrote: > > > > > 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 n

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

2020-12-11 Thread Aaron Meurer
On Fri, Dec 11, 2020 at 1:47 AM Eric Wieser wrote: > > > 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 the boolean dtype. > > I don't fully understand this argum

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 prevent a lot of churn. > And we

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

2020-12-11 Thread Ralf Gommers
On Thu, Dec 10, 2020 at 9:00 PM Sebastian Berg wrote: > 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, 2

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

2020-12-11 Thread Ralf Gommers
On Fri, Dec 11, 2020 at 9:47 AM Eric Wieser wrote: > > 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 the boolean dtype. > > I don't fully understand this argume

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

2020-12-11 Thread Eric Wieser
> 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 the boolean dtype. I don't fully understand this argument - `np.bool` is already not the boolean dtype. Either: * Th

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 > > > wrote: > > > > > > > On Wed, Dec

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

2020-12-10 Thread Ralf Gommers
On Thu, Dec 10, 2020 at 7:25 PM Sebastian Berg wrote: > 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, Aaro

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: > > > > Regarding np.bool specifically, if you want to

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

2020-12-09 Thread Stephan Hoyer
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: > > > Regarding np.bool specifically, if you want to deprecate this, you > > > might want to discuss this with us at the arra

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

2020-12-09 Thread Robert Kern
On Wed, Dec 9, 2020 at 4:08 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: > > > Regarding np.bool specifically, if you want to deprecate this, you > > > might want to discuss this with us at the arra

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

2020-12-09 Thread Aaron Meurer
On Wed, Dec 9, 2020 at 9:41 AM Sebastian Berg wrote: > > 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

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-07 Thread Aaron Meurer
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 the boolean dtype. Would it make sense for NumPy to change np

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

2020-12-07 Thread Eric Wieser
If the CI noise in downstream libraries is particularly painful, we could switch to `PendingDeprecationWarning` instead of `DeprecationWarning` to make it easier to add the warnings to an ignore list. I think this might make the warning less visible to end users though, who are the users that this

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

2020-12-07 Thread Ralf Gommers
On Sun, Dec 6, 2020 at 4:23 PM Sebastian Berg wrote: > 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 d

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] np.{bool,float,int} deprecation

2020-12-06 Thread Robert Kern
On Sun, Dec 6, 2020 at 12:52 AM Stephan Hoyer wrote: > On Sat, Dec 5, 2020 at 9:24 PM Mark Harfouche > wrote: > >> If the answer is to deprecate >> >> np.int(1) == int(1) >> >> then one can add a warning to the __init__ of the np.int class, but >> continue to subclass the python int class. >> >>

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

2020-12-05 Thread Stephan Hoyer
On Sat, Dec 5, 2020 at 9:24 PM Mark Harfouche wrote: > If the answer is to deprecate > > np.int(1) == int(1) > > then one can add a warning to the __init__ of the np.int class, but > continue to subclass the python int class. > > It just doesn’t seem worthwhile to to stop people from using dtype=

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

2020-12-05 Thread Mark Harfouche
I guess if the answer is to stop people from from numpy import * there is a good fix for that doesn’t involve deprecating dtype=np.int. If the answer is to deprecate np.int(1) == int(1) then one can add a warning to the __init__ of the np.int class, but continue to subclass the python int clas

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

2020-12-05 Thread Charles R Harris
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 > prerelease testing in scikit-image (which, hooray for rcs!), and resulted > in a lar

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

2020-12-05 Thread Andras Deak
On Sun, Dec 6, 2020 at 12:31 AM 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 prerelease > testing in scikit-image (which, hooray for rcs!), and resulted in a l