On 14-04-2015 23:49, Rob Gaddi wrote:
> On Tue, 14 Apr 2015 23:41:56 +0100, Paulo da Silva wrote:
>
>> Supposing I have 2 vectors v1 and v2 and a value (constant) k.
>> I want to build a vector r with all values of v1 greater than k and the
>> others from v2.
>>
>
> You're looking for numpy.where
On Tue, 14 Apr 2015 23:41:56 +0100, Paulo da Silva wrote:
> Supposing I have 2 vectors v1 and v2 and a value (constant) k.
> I want to build a vector r with all values of v1 greater than k and the
> others from v2.
>
You're looking for numpy.where() .
--
Rob Gaddi, Highland Technology -- www.h
I am new to numpy ...
Supposing I have 2 vectors v1 and v2 and a value (constant) k.
I want to build a vector r with all values of v1 greater than k and the
others from v2.
I found 2 ways, but not sure if they are the best solution:
1.
r1=v1.copy()
r2=v2.copy()
r1[r1=k]=0
r=r1+r2
2.
r=v1*(v1>=k
On 2009-09-09 20:46 PM, rechard wrote:
Robert Kern wrote:
On 2009-09-08 20:45 PM, hi_roger wrote:
hello, i want to ask a question about numpy.
i know how to select a submatrix using the slice object in numpy. But
how can i select a submatrix
A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2
Robert Kern wrote:
On 2009-09-08 20:45 PM, hi_roger wrote:
hello, i want to ask a question about numpy.
i know how to select a submatrix using the slice object in numpy. But
how can i select a submatrix
A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
j1,j2,j3 , and i1,i2,i3,j1
On 2009-09-08 22:03 PM, sturlamolden wrote:
On 9 Sep, 03:45, hi_roger wrote:
i know how to select a submatrix using the slice object in numpy. But
how can i select a submatrix
A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
j1,j2,j3 , and i1,i2,i3,j1,j2,j3 are all arbitrary nu
On 2009-09-08 20:45 PM, hi_roger wrote:
hello, i want to ask a question about numpy.
i know how to select a submatrix using the slice object in numpy. But
how can i select a submatrix
A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
j1,j2,j3 , and i1,i2,i3,j1,j2,j3 are all
On 9 Sep, 03:45, hi_roger wrote:
> hello, i want to ask a question about numpy.
>
> i know how to select a submatrix using the slice object in numpy. But
> how can i select a submatrix
> A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
> j1,j2,j3 , and i1,i2,i
On 9 Sep, 03:45, hi_roger wrote:
> i know how to select a submatrix using the slice object in numpy. But
> how can i select a submatrix
> A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
> j1,j2,j3 , and i1,i2,i3,j1,j2,j3 are all arbitrary numbers )
You just pass an array of ints
hello, i want to ask a question about numpy.
i know how to select a submatrix using the slice object in numpy. But
how can i select a submatrix
A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
j1,j2,j3 , and i1,i2,i3,j1,j2,j3 are all arbitrary numbers )
The submatrix must share
10 matches
Mail list logo