Request for porting pycdf to NumPy
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
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.
Is pycdf the same as pynetcdf? Where is it located? There is a netcdf in the sandbox of SciPy that works with NumPy. We should get it moved over into the main SciPy tree. Thanks, -Travis
Travis Oliphant wrote:
Is pycdf the same as pynetcdf? Where is it located?
I presume it's this one: http://pysclint.sourceforge.net/pycdf/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
hmmm, this page from unidata: http://www.unidata.ucar.edu/software/netcdf/software.html#Python Indicates 4-6 different Python netcfd interfaces! Has anyone done a review of these to see where effort would best be put into upgrading? I've used Konrad Hinsen's package a little bit with success, and I think he's upgraded all of Scientific Python to support numpy now, but I know nothing of the others. I think it would be ideal if Unidata could be persuaded to adopt an maintain one as the official version to save this extra work an confusion. Maybe there is some hope of this for netcdf4. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
I believe the person most qualified to answer that question would be Mary Haley, (haley at ucar.edu). On Feb 9, 2007, at 10:33 AM, Christopher Barker wrote:
Has anyone done a review of these to see where effort would best be put into upgrading?
** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-5451 ** ** Albuquerque, NM 87185-0370 Email: wfspotz@sandia.gov **
On Feb 9, 2007, at 18:33, Christopher Barker wrote:
hmmm, this page from unidata:
http://www.unidata.ucar.edu/software/netcdf/software.html#Python
Indicates 4-6 different Python netcfd interfaces!
...
I think it would be ideal if Unidata could be persuaded to adopt an maintain one as the official version to save this extra work an confusion. Maybe there is some hope of this for netcdf4.
It would certainly be nice to have an "official" Python interface maintained by somebody else, but I don't expect this to happen any time soon. Moreover, the existing interfaces have different characteristics that are partially incompatible but each appeal to some users. My own netCDF interface (part of ScientificPython) was designed to satisfy two major criteria: 1) Be as Pythonic as possible by implementing common object interfaces: arrays, dictionaries, and object attributes. netCDF variables are seen as "arrays on disk". 2) Provide netCDF access from Python as well as from Python extension modules written in C (or nowadays Pyrex). However, I can understand the needs of those with different priorities, e.g. those who want an API that resembles the C API for netCDF. Fortunately, there is something for everybody. Konrad. -- --------------------------------------------------------------------- Konrad Hinsen Centre de Biophysique Moléculaire, CNRS Orléans Synchrotron Soleil - Division Expériences Saint Aubin - BP 48 91192 Gif sur Yvette Cedex, France Tel. +33-1 69 35 97 15 E-Mail: hinsen@cnrs-orleans.fr ---------------------------------------------------------------------
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
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
Christian Marquardt wrote:
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,
Great job. Thanks so much. Would you mind adding these patches to the scipy web page. Or, perhaps we should place them in the numpy svn directory somewhere. -Travis
Andre Gosselin (the guy who wrote pycdf) also wrote an interface to HDF4 (not 5) named pyhdf.
Is he still maintaining these packages? Have you submitted the patches to him? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
On Fri, February 9, 2007 22:28, Christopher Barker wrote:
Andre Gosselin (the guy who wrote pycdf) also wrote an interface to HDF4 (not 5) named pyhdf.
Is he still maintaining these packages? Have you submitted the patches to him?
a) Don't know; the last releases of pycdf and pyhdf are from February 2001 and July 2005, respectively. b) Yes, but just half an hour ago, after I had seen the request for pycdf here. I would actually prefer if Andre would apply the patches in some way in his distribution. The C wrappers for both pycdf and pyhdf are created with swig, but the original interface description files are not included in the distribution. So I patched the generated wrapper code instead of the original files. Or rather let Travis' alter_codeN do the job;-)) Chris.
-Chris
-- Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
participants (7)
-
Bill Spotz -
Christian Marquardt -
Christopher Barker -
Daran L. Rife -
Konrad Hinsen -
Robert Kern -
Travis Oliphant