Marc Shivers marc.shivers at gmail.com writes:
you could use bitwise comparison with paretheses: In [8]: (a4)(a8)Out[8]:
array([False, False, False, False, False, True, True, True, False,
False, False], dtype=bool)
For cases like this I find it very useful to define a function
Thanks. quite useful!!
Chao
2011/10/15 Neil neilcrigh...@gmail.com
Marc Shivers marc.shivers at gmail.com writes:
you could use bitwise comparison with paretheses: In [8]:
(a4)(a8)Out[8]:
array([False, False, False, False, False, True, True, True, False,
False, False], dtype=bool)
Hi,
Continuing the exploration of float128 - can anyone explain this behavior?
np.float64(9223372036854775808.0) == 9223372036854775808L
True
np.float128(9223372036854775808.0) == 9223372036854775808L
False
int(np.float128(9223372036854775808.0)) == 9223372036854775808L
True
Hi,
On Wed, Oct 12, 2011 at 11:24 AM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:17 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
While struggling with floating point precision, I ran into this:
In [52]: a = 2**54+3
In [53]: a
Out[53]:
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
Hi,
On Tue, Oct 11, 2011 at 7:32 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Oct 11, 2011 at 2:06 PM, Derek Homeier
de...@astro.physik.uni-goettingen.de wrote:
On 11 Oct 2011, at 20:06, Matthew Brett wrote:
Have I missed a fast way of doing nice float to integer conversion?
By
Hello,
I need to print individual elements of a float64 array to a text file.
However in the file I only get 12 significant digits, the same as with:
a = np.zeros(3)
a.fill(1./3)
print a[0]
0.
len(str(a[0])) - 2
12
whereas
len(repr(a[0])) - 2
17
which makes more sense since I
On 15.10.2011, at 9:21PM, Hugo Gagnon wrote:
I need to print individual elements of a float64 array to a text file.
However in the file I only get 12 significant digits, the same as with:
a = np.zeros(3)
a.fill(1./3)
print a[0]
0.
len(str(a[0])) - 2
12
whereas
On Sat, Oct 15, 2011 at 1:12 PM, Matthew Brett matthew.br...@gmail.comwrote:
Hi,
Continuing the exploration of float128 - can anyone explain this behavior?
np.float64(9223372036854775808.0) == 9223372036854775808L
True
np.float128(9223372036854775808.0) == 9223372036854775808L
False
On 15.10.2011, at 9:42PM, Aronne Merrelli wrote:
On Sat, Oct 15, 2011 at 1:12 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
Continuing the exploration of float128 - can anyone explain this behavior?
np.float64(9223372036854775808.0) == 9223372036854775808L
True
Hi,
After getting rather confused, I concluded that float128 on a couple
of Intel systems I have, is in fact an 80 bit extended precision
number:
http://en.wikipedia.org/wiki/Extended_precision
np.finfo(np.float128).nmant
63
np.finfo(np.float128).nexp
15
That is rather confusing. What is
On Sat, Oct 15, 2011 at 12:54 PM, Matthew Brett matthew.br...@gmail.comwrote:
Hi,
On Wed, Oct 12, 2011 at 11:24 AM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Oct 11, 2011 at 12:17 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
While struggling with
12 matches
Mail list logo