Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread josef . pktd
On Wed, Oct 26, 2016 at 3:57 PM, Charles R Harris wrote: > > > On Wed, Oct 26, 2016 at 1:39 PM, wrote: > >> >> >> On Wed, Oct 26, 2016 at 3:23 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer >>> wrote: >>> I am also

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread josef . pktd
On Wed, Oct 26, 2016 at 3:39 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris > wrote: > [...] > > What I have been concerned about are the follow combinations that > currently > > return floats > > > > num: , exp: , res: > 'numpy.float32'> > > num: , exp: , res:

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Wed, Oct 26, 2016 at 1:39 PM, wrote: > > > On Wed, Oct 26, 2016 at 3:23 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: >> >>> I am also concerned about adding more special cases for NumPy scalars vs >>> arrays. Thes

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Wed, Oct 26, 2016 at 1:39 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris > wrote: > [...] > > What I have been concerned about are the follow combinations that > currently > > return floats > > > > num: , exp: , res: > 'numpy.float32'> > > num: , exp: , res:

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: > I am also concerned about adding more special cases for NumPy scalars vs > arrays. These cases are already confusing (e.g., making no distinction > between 0d arrays and scalars) and poorly documented. > > On Mon, Oct 24, 2016 at 4:30 PM, N

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Nathaniel Smith
On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris wrote: [...] > What I have been concerned about are the follow combinations that currently > return floats > > num: , exp: , res: 'numpy.float32'> > num: , exp: , res: 'numpy.float32'> > num: , exp: , res: 'numpy.float32'> > num: , exp: , res:

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread josef . pktd
On Wed, Oct 26, 2016 at 3:23 PM, Charles R Harris wrote: > > > On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: > >> I am also concerned about adding more special cases for NumPy scalars vs >> arrays. These cases are already confusing (e.g., making no distinction >> between 0d arrays and s

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-25 Thread Stephan Hoyer
I am also concerned about adding more special cases for NumPy scalars vs arrays. These cases are already confusing (e.g., making no distinction between 0d arrays and scalars) and poorly documented. On Mon, Oct 24, 2016 at 4:30 PM, Nathaniel Smith wrote: > On Mon, Oct 24, 2016 at 3:41 PM, Charles

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-24 Thread Nathaniel Smith
On Mon, Oct 24, 2016 at 3:41 PM, Charles R Harris wrote: > Hi All, > > I've been thinking about this some (a lot) more and have an alternate > proposal for the behavior of the `**` operator > > if both base and power are numpy/python scalar integers, convert to python > integers and call the `**`