Hi,
2011/10/18 Frédéric Bastien :
> What about a parameter that allow to select the option the user want?
> it would select between uint, upcasted_int, -MAX and +MAX. This way,
> at least it will be documented and user who care will have the choose.
>
> Personally, when the option is available, I
What about a parameter that allow to select the option the user want?
it would select between uint, upcasted_int, -MAX and +MAX. This way,
at least it will be documented and user who care will have the choose.
Personally, when the option is available, I would prefer the safe
version, uint, but I u
Hi,
On Wed, Oct 12, 2011 at 8:31 AM, David Cournapeau wrote:
> On 10/12/11, "V. Armando Solé" wrote:
>> On 12/10/2011 10:46, David Cournapeau wrote:
>>> On Wed, Oct 12, 2011 at 9:18 AM, "V. Armando Solé" wrote:
From a pure user perspective, I would not expect the abs function to
retu
On 10/12/11, "V. Armando Solé" wrote:
> On 12/10/2011 10:46, David Cournapeau wrote:
>> On Wed, Oct 12, 2011 at 9:18 AM, "V. Armando Solé" wrote:
>>> From a pure user perspective, I would not expect the abs function to
>>> return a negative number. Returning +127 plus a warning the first time
>>
On 11/10/11 21:16, Charles R Harris wrote:
> IIRC, matlab was said to return
> +127 as abs(-128), which, if true, is quite curious.
I just checked and this is indeed the case in Matlab 7.10.0 R2010a:
>> abs(int8(-128))
ans =
127
Cheers,
--
Daniele
___
On 12/10/2011 10:46, David Cournapeau wrote:
> On Wed, Oct 12, 2011 at 9:18 AM, "V. Armando Solé" wrote:
>> From a pure user perspective, I would not expect the abs function to
>> return a negative number. Returning +127 plus a warning the first time
>> that happens seems to me a good compromise.
On Wed, Oct 12, 2011 at 9:18 AM, "V. Armando Solé" wrote:
> From a pure user perspective, I would not expect the abs function to
> return a negative number. Returning +127 plus a warning the first time
> that happens seems to me a good compromise.
I guess the question is what's the common contex
From a pure user perspective, I would not expect the abs function to
return a negative number. Returning +127 plus a warning the first time
that happens seems to me a good compromise.
Armando
On 12/10/2011 09:46, David Cournapeau wrote:
> On Tue, Oct 11, 2011 at 8:16 PM, Charles R Harris
> w
On Tue, Oct 11, 2011 at 8:16 PM, Charles R Harris
wrote:
>
>
> On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett
> wrote:
>>
>> Hi,
>>
>> I recently ran into this:
>>
>> In [68]: arr = np.array(-128, np.int8)
>>
>> In [69]: arr
>> Out[69]: array(-128, dtype=int8)
>>
>> In [70]: np.abs(arr)
>> Out[7
On Tue, Oct 11, 2011 at 6:33 PM, wrote:
> On Tue, Oct 11, 2011 at 7:13 PM, Benjamin Root wrote:
> > On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett
> > wrote:
> >>
> >> Hi
> >>
> >> On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
> >> wrote:
> >> >
> >> >
> >> > On Tue, Oct 11, 2011 at 12:23
On Tue, Oct 11, 2011 at 7:13 PM, Benjamin Root wrote:
> On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett
> wrote:
>>
>> Hi
>>
>> On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
>> wrote:
>> >
>> >
>> > On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett
>> >
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >>
On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett wrote:
> Hi
>
> On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
> wrote:
> >
> >
> > On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett >
> > wrote:
> >>
> >> Hi,
> >>
> >> I recently ran into this:
> >>
> >> In [68]: arr = np.array(-128, np.int8)
>
Hi
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
wrote:
>
>
> On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett
> wrote:
>>
>> Hi,
>>
>> I recently ran into this:
>>
>> In [68]: arr = np.array(-128, np.int8)
>>
>> In [69]: arr
>> Out[69]: array(-128, dtype=int8)
>>
>> In [70]: np.abs(arr)
>> O
Hi,
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
wrote:
>
>
> On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett
> wrote:
>>
>> Hi,
>>
>> I recently ran into this:
>>
>> In [68]: arr = np.array(-128, np.int8)
>>
>> In [69]: arr
>> Out[69]: array(-128, dtype=int8)
>>
>> In [70]: np.abs(arr)
>>
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett wrote:
> Hi,
>
> I recently ran into this:
>
> In [68]: arr = np.array(-128, np.int8)
>
> In [69]: arr
> Out[69]: array(-128, dtype=int8)
>
> In [70]: np.abs(arr)
> Out[70]: -128
>
>
This has come up for discussion before, but no consensus was ever r
Hi,
I recently ran into this:
In [68]: arr = np.array(-128, np.int8)
In [69]: arr
Out[69]: array(-128, dtype=int8)
In [70]: np.abs(arr)
Out[70]: -128
Of course, I can see why this happens, but it is still surprising, and
it seems to me that it would be a confusing source of bugs, because of
co
16 matches
Mail list logo