Tony S Yu | 1 Jun 15:52
Picon
Favicon

Re: Fipy 2.0a1 with numpy 1.1


On May 30, 2008, at 5:30 PM, Jonathan Guyer wrote:

>
>
> On May 30, 2008, at 4:49 PM, Tony S Yu wrote:
>
>> Are there plans to make FiPy compatible with numpy 1.1?
>
> Of course, but it was only released yesterday.

Yeah, I guess I was a little over eager :).

In any case, I just read over the release notes for numpy 1.1, and it  
turns out they support the old masked array API (this change is what  
caused most of the breakages) in the module numpy.oldnumeric.ma.  
Changing to this import statement in the fipy numerix module led to 4  
failures;  3 of which are just due to a change in representation of  
floats near integer values; for example:

Expected:
     (3-4j)
Got:
     (3.0+-4.0j)

which isn't really important (to me at least). The 4th failure is  
actually from examples/diffusion/anisotropy.py, which failed for me  
before the numpy upgrade. Should this be failing?

Also, I was able to confirm that my fixes didn't break FiPy for the  
older numpy implementation of masked arrays. Most importantly, access  
to the old implementation allowed me to fix two more pieces that were  
broken. This means all the major failures listed in my first email  
have been fixed (at least on my setup), with the exception of the  
anisotropy example and the roundtrip through cPickle.

Here's a summary of all the changes:
Attachment (numpy1.1_changes.diff): application/octet-stream, 9 KiB

And if I haven't mentioned it to the FiPy developers before: thanks  
for a great PDE solver.

-Tony


Gmane