getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Problem with python interface


From: Julien Pommier
Subject: Re: [Getfem-users] Problem with python interface
Date: Tue, 13 Nov 2007 12:56:57 +0100
User-agent: Internet Messaging Program (IMP) 3.2.6

Hi,

I can't reproduce that here, demo_tripod.py is running fine, and the class
numarray.numarraycore.NumArray (which is the type of the variable 'pidtop') is
handled just fine by the getfem module (this is on ubuntu, with python 2.5.1
and numarray 1.5.2). Maybe you should check that you do not have multiple
getfem modules in your python path ? Or that you are really using numarray
1.5.2 ? Sorry, I have no better idea.

About migration to NumPy: I must say that I was quite pissed off when I
discovered that numarray was being deprecated. Initially the python interface
used Numeric. Then Numeric was being deprecated by numarray, so we switched,
and now numarray is being replaced by NumPy... which does not even have a
freely available documentation. So I prefer to wait. Everything would be much
simpler if python had a simple multidimensional array facility built into the
core language, I don't understand why it is still not the case..

(this being said, I don't think that the migration to numpy is a big task, a
search and replace of "numarray" with "numpy" should be almost sufficient, but
right now, numarray is probably more easily available than numpy on the average
linux)

Best regards,
Julien

Quoting LUK ShunTim <address@hidden>:

> Hello,
>
> I got this error when testing the python interface of getfem-3.0.1
>
> <quote>
> $ python demo_tripod.py
> This is the "modern" tripod demo, which uses the getfem model bricks
> importing the mesh..
> ** Could NOT import getfem_tvtk -- graphical output disabled **
>
> done!
> nbcvs=2799, nbpts=5621, qdim=3, fem = FEM_PK(3,2), nbdof=16764
> test [-10.      -10.       -9.99999 ...,  -4.54596  -7.27148  -5.9042 ]
> Traceback (most recent call last):
>    File "demo_tripod.py", line 43, in ?
>      ftop=m.faces_from_pid(pidtop)
>    File "/usr/lib/python2.4/site-packages/getfem/getfem.py", line 244,
> in faces_from_pid
>      return self.get("faces from pid", PIDLST)
>    File "/usr/lib/python2.4/site-packages/getfem/getfem.py", line 121,
> in get
>      return getfem('mesh_get',self.id, *args)
> RuntimeError: unhandled argument type: <class
> 'numarray.numarraycore.NumArray'>
> </quote>
>
> This is a debian/sid/amd64 box with python 2.4.4 and numarray 1.5.2. The
> other demo_plate.py runs OK. All c++ tests passed.
>
> BTW, is there any plan to migrate from numarray to numpy?
>
> Regards,
> ST
> --
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]