On Mon, Mar 15, 2010 at 5:58 PM, Nicolas Rougier
wrote:
>
>
> Thanks and in fact, I already wasted quite some time on and your last version
> will help me a lot. Unfortunately, I'm not a specialist at lattice Boltzmann
> methods at all so I'm not able to answer your questions (my initial idea wa
Thanks and in fact, I already wasted quite some time on and your last version
will help me a lot. Unfortunately, I'm not a specialist at lattice Boltzmann
methods at all so I'm not able to answer your questions (my initial idea was to
convert the matlab script to be have a running example to g
Ok, so I send yet another version. Maybe Bruce is right, but I didn't
care, because we have fret enough. Now it not only computes
something, but also displays something :-(
Nicolas, maybe you can now waste some of your time with it? I was
curious, both to understand and to get it working, but I
Pauli Virtanen iki.fi> writes:
Thank you. the problem is solved
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Mon, Mar 15, 2010 at 13:20, gerardo.berbeglia wrote:
>
> Suppose i have an array A of length n
> I want a variable b to be an array consisting of the first k elements of A
> and variable c to be an array with the last n-k elements of A.
>
> How do you do this?
>
> Example A = np.array([1,2,3,4,
Suppose i have an array A of length n
I want a variable b to be an array consisting of the first k elements of A
and variable c to be an array with the last n-k elements of A.
How do you do this?
Example A = np.array([1,2,3,4,5,6]), k = 2
b = [1,2]
c=[3,4,5,6]
Thanks.
--
View this message in
Michel,
A couple observations:
1) I don't see anything in your interface file for which numpy.i would
be helpful. Is that for something else not shown?
2) When you call PyArray_SimpleNewFromData(), the data buffer pointer
argument should be cast to (void*). I am surprised the compiler
di
On Mon, Mar 15, 2010 at 11:25 AM, Bruce Southey wrote:
> On 03/15/2010 11:06 AM, Pierre GM wrote:
>> On Mar 13, 2010, at 3:51 PM, josef.p...@gmail.com wrote:
>>
>>> I was trying to find out what the "helpful" message
>>> "TypeError: expected a readable buffer object" means
>>>
>>> and it seems ge
On 03/15/2010 11:06 AM, Pierre GM wrote:
> On Mar 13, 2010, at 3:51 PM, josef.p...@gmail.com wrote:
>
>> I was trying to find out what the "helpful" message
>> "TypeError: expected a readable buffer object" means
>>
>> and it seems genfromtxt has problems identifying long integers (at
>> least
On Mar 13, 2010, at 3:51 PM, josef.p...@gmail.com wrote:
> I was trying to find out what the "helpful" message
> "TypeError: expected a readable buffer object" means
>
> and it seems genfromtxt has problems identifying long integers (at
> least on Windows 32)
>
np.array(416068,int)
> Tr
I have another matrix operations which seems a little more complicated.
Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume
S is represented by a binary vector s, with a 1 at the index i if i is
in S. (e.g. if S={0,3} then s = [1,0,0,1])
I re-post the question because the examp
On Mon, Mar 15, 2010 at 9:58 AM, Gerardo Berbeglia wrote:
> I have another matrix operations which seems a little more complicated.
>
> Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume
> S is represented by a binary vector s, with a 1 at the index i if i is
> in S. (e.g. if S=
On Mon, Mar 15, 2010 at 10:58 AM, Gerardo Berbeglia
wrote:
> I have another matrix operations which seems a little more complicated.
>
> Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume
> S is represented by a binary vector s, with a 1 at the index i if i is
> in S. (e.g. if S
I have another matrix operations which seems a little more complicated.
Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume
S is represented by a binary vector s, with a 1 at the index i if i is
in S. (e.g. if S={0,3} then s = [1,0,0,1])
I would like to have an efficient way to
On Mon, Mar 15, 2010 at 9:14 AM, wrote:
> On Mon, Mar 15, 2010 at 9:09 AM, Gerardo Berbeglia
> wrote:
>> I would like to do with numpy the following operation.
>>
>> Let A be an n x n matrix and let s be an integer between 1 and n.
>>
>> I would like to have an n x n matrix B = f(A,s) such that
On Mon, Mar 15, 2010 at 9:09 AM, Gerardo Berbeglia wrote:
> I would like to do with numpy the following operation.
>
> Let A be an n x n matrix and let s be an integer between 1 and n.
>
> I would like to have an n x n matrix B = f(A,s) such that
>
> - If we only look at the first s columns of B,
I would like to do with numpy the following operation.
Let A be an n x n matrix and let s be an integer between 1 and n.
I would like to have an n x n matrix B = f(A,s) such that
- If we only look at the first s columns of B, we will not see any
difference with respect to the first s columns of
Hello,
I am trying to do what was suppose to be a very easy
exercice. It consists in converting a C++ class Container into a
numpy array as show below using typename
My problem is that if I make the method getContainer run from
python I will get a numpy array as expected by with wrong value
18 matches
Mail list logo