[Numpy-discussion] pyhdf / was: Request for porting pycdf to NumPy

Christian Marquardt christian@marquardt...
Fri Feb 9 15:14:34 CST 2007


As we are at it,

Andre Gosselin (the guy who wrote pycdf) also wrote an interface to HDF4
(not 5) named pyhdf. I'm using that with numpy as well (patch attached),
but I haven't tested it much - little more than just running the examples,
really (which appear to be ok). Maybe it's useful...

In pyhdf, the author didn't support different array interfaces; so the
attached patch just modifes the existing source code and moves it over
to numpy. I've also attached a "install script" which makes use of the
particular lacotion of the HDF4 libraries (in $PREFIX/lib) and header
files (in $PREFIX/include/hdf), so it it almost certainly needs to be
adapted to the location of the actual HDF libraries and headers.

Regards,

  Christian.


On Fri, February 9, 2007 22:00, Christian Marquardt wrote:
> Dear list,
>
> attached is a patch for the original pycdf-0.6.2-rc1 distribution as
> available through sourceforge - and a little shell script illustrating
> how to install it. After applyng the patch, it should be configured for
> numpy. Note that the "installation" script uses an environment variable
> PREFIX to define where the pacjkage is installed; it also assumes that
> the netcdf libraries are installed in $PREFIX/lib.
>
> The orginal author already supported both numeric and numarray, so I just
> added a new subdirectory for numpy - which is simply the numeric version
> slightly changed. The patch is only that large because it replicates much
> of already existing code...
>
> I have been using this "port" for many weeks now without any problems or
> difficulties. I hope it's useful for others as well;-)
>
>   Christian.
>
>
>
> On Fri, February 9, 2007 15:31, Daran L. Rife wrote:
>> Hi Travis,
>>
>> If you're still offering NumPy "patches" to third party
>> packages that rely upon Numeric, I would really like for
>> pycdf to be ported to NumPy. This would allow me to
>> completely transition to NumPy.
>>
>> Thanks very much for considering my request.
>>
>>
>> Daran Rife
>>
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyhdf-0.7-3-numpy.patch
Type: text/x-patch
Size: 12890 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070209/ecd37781/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_pyhdf-0.7-3-numpy-linux.sh
Type: application/x-shellscript
Size: 603 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070209/ecd37781/attachment-0001.bin 


More information about the Numpy-discussion mailing list