diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-13 07:07:30 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-13 07:07:30 +0000 |
commit | e3b5adb2b14e6143cdd4da7c4456cd9e6e17e4f7 (patch) | |
tree | ed9ab4fa0de67efa6b94150a8fb263478f1e14c2 /numpy/doc/pyrex | |
parent | 3afb449634c2f1aac55e0a0d9d0693d098d66d8c (diff) | |
download | numpy-e3b5adb2b14e6143cdd4da7c4456cd9e6e17e4f7.tar.gz |
Move swig and pyrex over
Diffstat (limited to 'numpy/doc/pyrex')
-rw-r--r-- | numpy/doc/pyrex/c_numpy.pxd | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/numpy/doc/pyrex/c_numpy.pxd b/numpy/doc/pyrex/c_numpy.pxd new file mode 100644 index 000000000..6482101a0 --- /dev/null +++ b/numpy/doc/pyrex/c_numpy.pxd @@ -0,0 +1,59 @@ +# :Author: Robert Kern +# :Copyright: 2004, Enthought, Inc. +# :License: BSD Style + + +cdef extern from "numpy/arrayobject.h": + ctypedef enum PyArray_TYPES: + PyArray_BOOL + PyArray_BYTE + PyArray_UBYTE + PyArray_SHORT + PyArray_USHORT + PyArray_INT + PyArray_UINT + PyArray_LONG + PyArray_ULONG + PyArray_LONGLONG + PyArray_ULONGLONG + PyArray_FLOAT + PyArray_DOUBLE + PyArray_LONGDOUBLE + PyArray_CFLOAT + PyArray_CDOUBLE + PyArray_CLONGDOUBLE + PyArray_OBJECT + PyArray_STRING + PyArray_UNICODE + PyArray_VOID + PyArray_NTYPES + PyArray_NOTYPE + + ctypedef int intp + + ctypedef extern class numpy.dtype [object PyArray_Descr]: + cdef int type_num, elsize, alignment + cdef char type, kind, byteorder, hasobject + cdef object fields, typeobj + + ctypedef extern class numpy.ndarray [object PyArrayObject]: + cdef char *data + cdef int nd + cdef intp *dimensions + cdef intp *strides + cdef object base + cdef dtype descr + cdef int flags + + ndarray PyArray_SimpleNew(int ndims, intp* dims, int item_type) + int PyArray_Check(object obj) + ndarray PyArray_ContiguousFromObject(object obj, PyArray_TYPES type, + int mindim, int maxdim) + intp PyArray_SIZE(ndarray arr) + void *PyArray_DATA(ndarray arr) + ndarray PyArray_FromAny(object obj, dtype newtype, int mindim, int maxdim, + int requirements, object context) + ndarray PyArray_NewFromDescr(object subtype, dtype newtype, int nd, intp* dims, + intp* strides, void* data, int flags, object parent) + + void import_array() |