Keith Goodman wrote:
Interestingly, MATLAB (v7.5.0) takes a different approach:
ans =
1271
-A
ans =
127 -1
can anyone explain that? -- just curious.
Charles R Harris wrote:
We could simply define the range of int8 as [-127,127], but that is
somewhat problematical also.
That
On Wed, May 28, 2008 at 1:08 AM, Chris.Barker [EMAIL PROTECTED] wrote:
Keith Goodman wrote:
Interestingly, MATLAB (v7.5.0) takes a different approach:
ans =
1271
-A
ans =
127 -1
can anyone explain that? -- just curious.
Charles R Harris wrote:
We could simply define the
Stéfan van der Walt wrote:
Did this change recently?
In [33]: np.__version__
Out[33]: '1.1.0.dev5211'
In [34]: np.minimum(np.uint8(164), np.uint64(12807)).dtype
Out[34]: dtype('uint64')
But yes, that looks like it should return a uint8.
This discussion is really moot unless a proposal
On Tue, May 27, 2008 at 2:10 PM, Travis E. Oliphant [EMAIL PROTECTED]
wrote:
Stéfan van der Walt wrote:
Did this change recently?
In [33]: np.__version__
Out[33]: '1.1.0.dev5211'
In [34]: np.minimum(np.uint8(164), np.uint64(12807)).dtype
Out[34]: dtype('uint64')
But yes, that
Charles R Harris wrote:
On Tue, May 27, 2008 at 2:10 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Stéfan van der Walt wrote:
Did this change recently?
In [33]: np.__version__
Out[33]: '1.1.0.dev5211'
In [34]:
On Tue, May 27, 2008 at 2:40 PM, Travis E. Oliphant [EMAIL PROTECTED]
wrote:
Charles R Harris wrote:
On Tue, May 27, 2008 at 2:10 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Stéfan van der Walt wrote:
Did this change recently?
In
On Tue, May 27, 2008 at 2:40 PM, Travis E. Oliphant [EMAIL PROTECTED]
wrote:
Charles R Harris wrote:
On Tue, May 27, 2008 at 2:10 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Stéfan van der Walt wrote:
Did this change recently?
In
On Tue, May 27, 2008 at 3:28 PM, Charles R Harris [EMAIL PROTECTED]
wrote:
On Tue, May 27, 2008 at 2:40 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
On Tue, May 27, 2008 at 2:10 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
It's like pulling teeth
without anesthesia to get these things defined and everyone is going to
think I'm an a-hole. It's a dirty job, but someone has got to do it.
FWIW, I'm glad you're doing it!
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency
Charles R Harris wrote:
Yep, abs fails:
In [1]: abs(array([-128,-128], dtype=int8))
Out[1]: array([-128, -128], dtype=int8)
Well, yes, but this is a know vagary of the the hardware implementation
for signed integers, as demonstrated by that JAVA Puzzles video that Jon
Wright pointed us to
So the segfaults are defined behavior? ;) It's like pulling teeth
without anesthesia to get these things defined and everyone is going
to think I'm an a-hole. It's a dirty job, but someone has got to do it.
I actually appreciate what you are doing. Obviously the segfaults are
bugs.
On Tue, May 27, 2008 at 4:07 PM, Christopher Barker [EMAIL PROTECTED]
wrote:
Charles R Harris wrote:
Yep, abs fails:
In [1]: abs(array([-128,-128], dtype=int8))
Out[1]: array([-128, -128], dtype=int8)
Well, yes, but this is a know vagary of the the hardware implementation
for signed
On Tue, May 27, 2008 at 4:11 PM, Travis E. Oliphant [EMAIL PROTECTED]
wrote:
So the segfaults are defined behavior? ;) It's like pulling teeth
without anesthesia to get these things defined and everyone is going
to think I'm an a-hole. It's a dirty job, but someone has got to do it.
I
On Tue, May 27, 2008 at 4:12 PM, Charles R Harris [EMAIL PROTECTED]
wrote:
On Tue, May 27, 2008 at 4:07 PM, Christopher Barker [EMAIL PROTECTED]
wrote:
Charles R Harris wrote:
Yep, abs fails:
In [1]: abs(array([-128,-128], dtype=int8))
Out[1]: array([-128, -128], dtype=int8)
Charles R Harris wrote:
On Tue, May 27, 2008 at 4:07 PM, Christopher Barker
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
Yep, abs fails:
In [1]: abs(array([-128,-128], dtype=int8))
Out[1]: array([-128, -128], dtype=int8)
Well,
On Tue, May 27, 2008 at 5:39 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
I'm not so sure. I know I wouldn't expect to get a different type back
with a call to abs(). Do we really want to change that expectation just
for the case of MIN_INT?
While everyone is going to want an unsigned
On Tue, May 27, 2008 at 4:39 PM, Christopher Barker [EMAIL PROTECTED]
wrote:
Travis E. Oliphant wrote:
Yes, it does make sense to me for abs to use an unsigned type for
integers.
I'm not so sure. I know I wouldn't expect to get a different type back
with a call to abs(). Do we really want
On Tue, May 27, 2008 at 5:27 PM, Nathan Bell [EMAIL PROTECTED] wrote:
On Tue, May 27, 2008 at 5:39 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
I'm not so sure. I know I wouldn't expect to get a different type back
with a call to abs(). Do we really want to change that expectation just
Charles R Harris wrote:
I guess it
depends on what guarantees we want to make, which is what this is all about.
Exactly. However, while I'd like to guarantee that abs(x) = 0, the
truth is that numpy is close to the metal in a lot of ways, and anyone
should know that the arithmetic of
On Tue, May 27, 2008 at 7:08 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
Exactly. However, while I'd like to guarantee that abs(x) = 0, the
truth is that numpy is close to the metal in a lot of ways, and anyone
should know that the arithmetic of integers near max and minimum values
is
On Tue, May 27, 2008 at 4:27 PM, Nathan Bell [EMAIL PROTECTED] wrote:
On Tue, May 27, 2008 at 5:39 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
I'm not so sure. I know I wouldn't expect to get a different type back
with a call to abs(). Do we really want to change that expectation just
On Tue, May 27, 2008 at 8:14 PM, Keith Goodman [EMAIL PROTECTED] wrote:
On Tue, May 27, 2008 at 4:27 PM, Nathan Bell [EMAIL PROTECTED] wrote:
On Tue, May 27, 2008 at 5:39 PM, Christopher Barker
[EMAIL PROTECTED] wrote:
I'm not so sure. I know I wouldn't expect to get a different type
22 matches
Mail list logo