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
Hi,
2011/10/18 Frédéric Bastien no...@nouiz.org:
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
Hi,
On Wed, Oct 12, 2011 at 8:31 AM, David Cournapeau courn...@gmail.com wrote:
On 10/12/11, V. Armando Solé s...@esrf.fr 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
On Tue, Oct 11, 2011 at 8:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett matthew.br...@gmail.com
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
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
On Wed, Oct 12, 2011 at 9:18 AM, V. Armando Solé s...@esrf.fr 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
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.
I
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 10/12/11, V. Armando Solé s...@esrf.fr 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
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
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett matthew.br...@gmail.comwrote:
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
Hi,
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
I recently ran into this:
In [68]: arr = np.array(-128, np.int8)
In [69]: arr
Out[69]: array(-128, dtype=int8)
Hi
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett matthew.br...@gmail.com
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
On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett matthew.br...@gmail.comwrote:
Hi
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
I recently ran into this:
On Tue, Oct 11, 2011 at 7:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:23 PM, Matthew Brett
On Tue, Oct 11, 2011 at 6:33 PM, josef.p...@gmail.com wrote:
On Tue, Oct 11, 2011 at 7:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Oct 11, 2011 at 2:51 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi
On Tue, Oct 11, 2011 at 3:16 PM, Charles R Harris
16 matches
Mail list logo