I still strongly favour ending up at int**int -> float, and like
Peter's suggestion of raising a general warning rather than an
exception for negative powers. -- Marten
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/m
> On Sun, Oct 9, 2016 at 12:59 PM, Stephan Hoyer wrote:
>
>>
>> I agree with Sebastian and Nathaniel. I don't think we can deviating from
>> the existing behavior (int ** int -> int) without breaking lots of existing
>> code, and if we did, yes, we would need a new integer power function.
>>
>> I
On Sun, Oct 9, 2016 at 12:59 PM, Stephan Hoyer wrote:
> On Sun, Oct 9, 2016 at 6:25 AM, Sebastian Berg > wrote:
>
>> For what its worth, I still feel it is probably the only real option to
>> go with error, changing to float may have weird effects. Which does not
>> mean it is impossible, I admi
On Sun, Oct 9, 2016 at 6:25 AM, Sebastian Berg
wrote:
> For what its worth, I still feel it is probably the only real option to
> go with error, changing to float may have weird effects. Which does not
> mean it is impossible, I admit, though I would like some data on how
> downstream would handl
On Fr, 2016-10-07 at 19:12 -0600, Charles R Harris wrote:
> Hi All,
>
> The time for NumPy 1.12.0 approaches and I like to have a final
> decision on the treatment of integers to negative integer powers with
> the `**` operator. The two alternatives looked to be
>
> Raise an error for arrays and
> Sounds good to me. I agree that we should prioritize within-numpy
> consistency over consistency with Python.
>
I agree with that. Because of numpy consitetncy, the `**` operator should
always return float. Right now the case is:
>>> aa = np.arange(2, 10, dtype=int)
array([2, 3, 4, 5, 6, 7, 8,
On Sun, Oct 9, 2016 at 4:12 AM, Nathaniel Smith wrote:
> On Sat, Oct 8, 2016 at 6:59 AM, Charles R Harris
> wrote:
> >
> >
> > On Sat, Oct 8, 2016 at 4:40 AM, Nathaniel Smith wrote:
> >>
> >> On Fri, Oct 7, 2016 at 6:12 PM, Charles R Harris
> >> wrote:
> >> > Hi All,
> >> >
> >> > The time for
On Sat, Oct 8, 2016 at 3:18 PM, Krisztián Horváth wrote:
>
>
>
>> but then that violates the numpy
>> principle that output dtypes should be determined entirely by input
>> dtypes, without peeking at the actual values. (And this rule is very
>> important for avoiding nasty surprises when you run y
but then that violates the numpy
> principle that output dtypes should be determined entirely by input
> dtypes, without peeking at the actual values. (And this rule is very
> important for avoiding nasty surprises when you run your code on new
> inputs.)
>
At division you get back an array of floa
On Sat, Oct 8, 2016 at 1:40 PM, V. Armando Sole wrote:
> Well, testing under windows 64 bit, Python 3.5.2, positive powers of
> integers give integers and negative powers of integers give floats. So, do
> you want to raise an exception when taking a negative power of an element of
> an array of in
Well, testing under windows 64 bit, Python 3.5.2, positive powers of
integers give integers and negative powers of integers give floats. So,
do you want to raise an exception when taking a negative power of an
element of an array of integers? Because not doing so would be
inconsistent with rais
Sorry, I was not clear enough. I meant that the second option (always
float) would be more coherent with Python3.
On Oct 8, 2016 9:36 PM, "Charles R Harris"
wrote:
On Sat, Oct 8, 2016 at 1:31 PM, Krisztián Horváth
wrote:
> Hello,
>
> I think it should be consistent with Python3. So, it shoul
On Sat, Oct 8, 2016 at 1:31 PM, Krisztián Horváth
wrote:
> Hello,
>
> I think it should be consistent with Python3. So, it should give back a
> float.
>
> Best regards,
> Krisztian
>
>
Can't do that and also return integers for positive powers. It isn't
possible to have behavior completely compat
Hello,
I think it should be consistent with Python3. So, it should give back a
float.
Best regards,
Krisztian
On Sat, Oct 8, 2016 at 3:12 AM, Charles R Harris
wrote:
> Hi All,
>
> The time for NumPy 1.12.0 approaches and I like to have a final decision
> on the treatment of integers to negativ
On Sat, Oct 8, 2016 at 9:12 AM, Nathaniel Smith wrote:
> On Sat, Oct 8, 2016 at 6:59 AM, Charles R Harris
> wrote:
> >
> >
> > On Sat, Oct 8, 2016 at 4:40 AM, Nathaniel Smith wrote:
> >>
> >> On Fri, Oct 7, 2016 at 6:12 PM, Charles R Harris
> >> wrote:
> >> > Hi All,
> >> >
> >> > The time for
On Sat, Oct 8, 2016 at 6:59 AM, Charles R Harris
wrote:
>
>
> On Sat, Oct 8, 2016 at 4:40 AM, Nathaniel Smith wrote:
>>
>> On Fri, Oct 7, 2016 at 6:12 PM, Charles R Harris
>> wrote:
>> > Hi All,
>> >
>> > The time for NumPy 1.12.0 approaches and I like to have a final decision
>> > on
>> > the t
On Sat, Oct 8, 2016 at 4:40 AM, Nathaniel Smith wrote:
> On Fri, Oct 7, 2016 at 6:12 PM, Charles R Harris
> wrote:
> > Hi All,
> >
> > The time for NumPy 1.12.0 approaches and I like to have a final decision
> on
> > the treatment of integers to negative integer powers with the `**`
> operator.
On Fri, Oct 7, 2016 at 6:12 PM, Charles R Harris
wrote:
> Hi All,
>
> The time for NumPy 1.12.0 approaches and I like to have a final decision on
> the treatment of integers to negative integer powers with the `**` operator.
> The two alternatives looked to be
>
> Raise an error for arrays and num
Hi all,
Just to have the options clear. Is the operator '**' going to be handled
in any different manner than pow?
Thanks.
Armando
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion
On 10/7/2016 9:12 PM, Charles R Harris wrote:
*Always return a float *
/Pluses/
* Computational convenience
Is the behavior of C++11 of any relevance to the choice?
http://www.cplusplus.com/reference/cmath/pow/
Alan Isaac
___
NumPy-Discussion mai
On Fri, Oct 7, 2016 at 9:12 PM, Charles R Harris
wrote:
> Hi All,
>
> The time for NumPy 1.12.0 approaches and I like to have a final decision on
> the treatment of integers to negative integer powers with the `**` operator.
> The two alternatives looked to be
>
> Raise an error for arrays and num
21 matches
Mail list logo