I've been playing a bit with ctypes and realized that with a little 
help, it could be made much easier to interface with NumPy arrays.  
Thus, I added a ctypes attribute to the NumPy array.  If ctypes is 
installed, this attribute returns a "conversion" object otherwise an 
AttributeError is raised.

The ctypes-conversion object has attributes which return c_types aware 
objects so that the information can be passed directly to c-code (as an 
integer, the number of dimensions can already be passed using c-types).

The information available and it's corresponding c_type is

data           -  c_void_p
shape, strides -  c_int * nd  or c_long * nd or c_longlong * nd 
depending on platform

-Travis





Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to