On Sat, Apr 25, 2009 at 4:38 PM, Ian Mallett wrote:
> Oops, one more thing. In reference to:
> vec = array([[0,0,0],[0,1,0],[0,0,3]])
> pos = array([0,4,0])
> sqrt(((vec - pos)**2).sum(1)) -> array([ 4., 3., 5.])
>
> Can I make "vec" an array of class instances? I tried:
> class c:
> def _
Oops, one more thing. In reference to:
vec = array([[0,0,0],[0,1,0],[0,0,3]])
pos = array([0,4,0])
sqrt(((vec - pos)**2).sum(1)) -> array([ 4., 3., 5.])
Can I make "vec" an array of class instances? I tried:
class c:
def __init__(self):
self.position = [0,0,0]
vec = array([c(),c(),
On Sat, Apr 25, 2009 at 12:57 PM, Charles R Harris <
charlesr.har...@gmail.com> wrote:
> In [3]: vec = array([[0,0,0],[0,1,0],[0,0,3]])
>
> In [4]: pos = array([0,4,0])
>
> In [5]: sqrt(((vec - pos)**2).sum(1))
> Out[5]: array([ 4., 3., 5.])
>
> Chuck
>
On Sat, Apr 25, 2009 at 1:00 PM, wrote:
On Sat, Apr 25, 2009 at 3:57 PM, Charles R Harris
wrote:
>
>
> On Sat, Apr 25, 2009 at 12:50 PM, Ian Mallett wrote:
>>
>> Hi,
>>
>> I have an array sized n*3. Each three-component is a 3D position. Given
>> another 3D position, how is the distance between it and every
>> three-component in the
On Sat, Apr 25, 2009 at 12:50 PM, Ian Mallett wrote:
> Hi,
>
> I have an array sized n*3. Each three-component is a 3D position. Given
> another 3D position, how is the distance between it and every
> three-component in the array found with NumPy?
>
> So, for example, if the array is:
> [[0,0,0
Hi,
I have an array sized n*3. Each three-component is a 3D position. Given
another 3D position, how is the distance between it and every
three-component in the array found with NumPy?
So, for example, if the array is:
[[0,0,0],[0,1,0],[0,0,3]]
And the position is:
[0,4,0]
I need this array out
On Apr 25, 2009, at 5:36 AM, Gael Varoquaux wrote:
> On Fri, Apr 24, 2009 at 10:11:07PM -0400, Chris Colbert wrote:
>> Like the subject says, is there a way to register numpy with
>> synaptic
>> after building numpy from source?
>
> Don't play with the system's packaging system unless you r
On Fri, Apr 24, 2009 at 10:11:07PM -0400, Chris Colbert wrote:
>Like the subject says, is there a way to register numpy with synaptic
>after building numpy from source?
Don't play with the system's packaging system unless you really know what
you are doing.
Just install the numpy you are