On 10/07/2012 12:41 AM, Jianbao Tao wrote:
> Hi,
>
> I am developing a Python wrapper of the NASA CDF C library in Cython. I
> have got a working version of it now, but it is slower than the
> counterpart in IDL. For loading the same file, mine takes about 400 ms,
> whereas the IDL version takes about 290 ms.

Does spacepy.pycdf not work well for you? (Not Cython, of course...)

As Dag pointed out, passing a pointer to the numpy array data in to the 
CDF library works very nicely, although you may need some contortions to 
handle column-major zVars. (Making the numpy array Fortran order doesn't 
quite do it since the record dimension doesn't move around.)

-- 
Jonathan Niehof
ISR-3 Space Data Systems
Los Alamos National Laboratory
MS-D466
Los Alamos, NM 87545

Phone: 505-667-9595
email: [email protected]

Correspondence /
Technical data or Software Publicly Available
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to