Michel Dupront | 3 Oct 12:12
Favicon

Problème pour construire les tests Numpy-Swig


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 '%typecheck' expects 1 argument
:92: Error: Macro '%typecheck' expects 1 argument
:119: Error: Macro '%typecheck' expects 1 argument
:148: Error: Macro '%typecheck' expects 1 argument
:177: Error: Macro '%typecheck' expects 1 argument
:206: Error: Macro '%typecheck' expects 1 argument
:235: Error: Macro '%typecheck' expects 1 argument
.......
"""

Il semble que ca provienne des directives %numpy_typemaps a la fin du fichier numpy.i:

"""
/* Concrete instances of the %numpy_typemaps() macro: Each invocation
 * below applies all of the typemaps above to the specified data type.
 */
%numpy_typemaps(signed char       , NPY_BYTE     , int)
%numpy_typemaps(unsigned char     , NPY_UBYTE    , int)*/
%numpy_typemaps(short             , NPY_SHORT    , int)
/*%numpy_typemaps(unsigned short    , NPY_USHORT   , int)
(Continue reading)

Michel Dupront | 3 Oct 12:21
Favicon

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


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 argument
:64: Error: Macro '%typecheck' expects 1 argument
:92: Error: Macro '%typecheck' expects 1 argument
:119: Error: Macro '%typecheck' expects 1 argument
:148: Error: Macro '%typecheck' expects 1 argument
:177: Error: Macro '%typecheck' expects 1 argument
:206: Error: Macro '%typecheck' expects 1 argument
:235: Error: Macro '%typecheck' expects 1 argument
.......
"""

It seems that the directive %numpy_typemaps is responsible for this error:
"""
/* Concrete instances of the %numpy_typemaps() macro: Each invocation
 * below applies all of the typemaps above to the specified data type.
 */
%numpy_typemaps(signed char       , NPY_BYTE     , int)
%numpy_typemaps(unsigned char     , NPY_UBYTE    , int)*/
%numpy_typemaps(short             , NPY_SHORT    , int)
/*%numpy_typemaps(unsigned short    , NPY_USHORT   , int)
(Continue reading)

Michel Dupront | 3 Oct 17:21
Favicon

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


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: michel.dupront <at> hotmail.fr
> To: numpy-discussion <at> scipy.org
> Date: Fri, 3 Oct 2008 12:21:20 +0200
> Subject: [Numpy-discussion]  RE:  Problème pour construire les tests Numpy-Swig
> 
> 
> 
> 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 argument
> :64: Error: Macro '%typecheck' expects 1 argument
> :92: Error: Macro '%typecheck' expects 1 argument
> :119: Error: Macro '%typecheck' expects 1 argument
> :148: Error: Macro '%typecheck' expects 1 argument
> :177: Error: Macro '%typecheck' expects 1 argument
> :206: Error: Macro '%typecheck' expects 1 argument
> :235: Error: Macro '%typecheck' expects 1 argument
(Continue reading)

Nathan Bell | 3 Oct 18:56

Re: Problème pour construire les tests Numpy-Swig

On Fri, Oct 3, 2008 at 11:21 AM, Michel Dupront
<michel.dupront <at> hotmail.fr> wrote:
>
> 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 !!!
>

SWIG often has that effect on people :)

--

-- 
Nathan Bell wnbell <at> gmail.com
http://graphics.cs.uiuc.edu/~wnbell/
Satisfied SWIG customer

Gmane