On 10/25/06, Pierre GM [EMAIL PROTECTED] wrote:
On Tuesday 24 October 2006 02:50, Michael Sorich wrote:
I am currently running numpy rc2 (I haven't tried your
reimplementation yet as I am still using python 2.3). I am wondering
whether the new maskedarray is able to handle construction
I am currently running numpy rc2 (I haven't tried your
reimplementation yet as I am still using python 2.3). I am wondering
whether the new maskedarray is able to handle construction of arrays
from masked scalar values (not sure if this is the correct term). I
ran across a situation recently when
On 10/18/06, Daniel Arbuckle [EMAIL PROTECTED] wrote:
Why does a[b1, b2] not mean the same thing as a[b1][:, b2], when a
is an array and b1 and b2 are appropriately sized arrays of
booleans?
From my previous experience with R I am used to a[b1, b2] being
equivalent to a[b1][:, b2], so this is
Does this new MA class allow masking of rearray like arrays? The numpy
(1.0b5) version does not seem to. e.g.
from numpy import *
desc = [('name','S30'),('age',int8),('weight',float32)]
a = array([('Bill',31,260.0),('Fred', 15, 145.0)], dtype=desc)
print a[0]
print a['name']
a2 =
--
0.9.9.2538
[[False False False]
[False False False]]
False
On 6/21/06, Pierre GM [EMAIL PROTECTED] wrote:
On Wednesday 21 June 2006 04:46, Michael Sorich wrote:
When transposing a masked array of dtype 'f8' I noticed that an
ndarray of dtype '|O4' was returned.
OK, I see where the problem is:
When
Hi Sebastian,
I am not sure if there is a function already defined in numpy, but
something like this may be what you are after
def distance(a1, a2):
return sqrt(sum((a1[:,newaxis,:] - a2[newaxis,:,:])**2, axis=2))
The general idea is to avoid loops if you want the code to execute
fast. I