[Numpy-discussion] use of the PyArray_SETITEM numpy method

2010-12-22 Thread Michel Dupront
Hello, Please somebody help me ! I am really confused with all these void that I see everywhere. The documentation says: PyObject * PyArray_SETITEM(PyObject * arr, void* itemptr, PyObject* obj) I created a 1D array of doubles with PyArray_SimpleNew. Now I am in a loop of index i to feed

[Numpy-discussion] use of %extend

2010-04-15 Thread Michel Dupront
Hello, With the following example, given in the documentation: struct Vector { double x,y,z; }; %extend Vector { Vector __add__(Vector *other) { Vector v; v.x = $self-x + other-x; v.y = $self-y + other-y; v.z = $self-z + other-z; return v;

Re: [Numpy-discussion] use of %extend

2010-04-15 Thread Michel Dupront
Yes. I am really sorry about that. From: seb.ha...@gmail.com Date: Thu, 15 Apr 2010 13:24:10 +0200 To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] use of %extend did you mean to send this to the SWIG list !? -S. On Thu, Apr 15, 2010 at 11:53 AM, Michel Dupront

[Numpy-discussion] Numpi array and typemap

2010-03-15 Thread Michel Dupront
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

[Numpy-discussion] Problème pour construire les tests Numpy-Swig

2008-10-03 Thread Michel Dupront
Bonjour, Je viens d'installer Numpy. Je suis intéressé par l'utilisation de swig. Lorsque je tente de construire les tests j'ai cette erreur: swig -c++ -python Array.i :9: Error: Macro '%typecheck' expects 1 argument :36: Error: Macro '%typecheck' expects 1 argument :64: Error: Macro

[Numpy-discussion] RE: Problème pour constru ire les tests Numpy-Swig

2008-10-03 Thread Michel Dupront
Oh sorry I wrote my first email in french Hello, I just installed Numpy. I am interested in using Swig. When I try to build the tests I get the following error message: swig -c++ -python Array.i :9: Error: Macro '%typecheck' expects 1 argument :36: Error: Macro '%typecheck' expects 1

[Numpy-discussion] RE: RE: Problème pour construire les tests Numpy-Swig

2008-10-03 Thread Michel Dupront
I was using swig 1.3.24. I installed the last swig version 1.3.36 and now it is working fine ! and it makes me very very happy !!! From: [EMAIL PROTECTED] To: numpy-discussion@scipy.org Date: Fri, 3 Oct 2008 12:21:20 +0200 Subject:

[Numpy-discussion] A basic question about swig and Numeric

2008-09-24 Thread Michel Dupront
Hello, I am trying to use Numeric and swig but it seems that there are few points that I don't understand. The only excuse I have is that I am new to these tools. I have a simple example that I cannot make work the way I would like. I have a c++ function that take as argument a