File: numpy.pxi

package info (click to toggle)
python-enable 3.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,392 kB
  • ctags: 17,135
  • sloc: cpp: 79,151; python: 29,601; makefile: 2,926; sh: 43
file content (40 lines) | stat: -rw-r--r-- 962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# :Author:    Robert Kern
# :Copyright: 2004, Enthought, Inc.
# :License:   BSD Style


cdef extern from "numpy/oldnumeric.h":
    ctypedef enum PyArray_TYPES:
        PyArray_CHAR
        PyArray_UBYTE
        PyArray_SBYTE
        PyArray_SHORT
        PyArray_USHORT 
        PyArray_INT
        PyArray_UINT 
        PyArray_LONG
        PyArray_FLOAT
        PyArray_DOUBLE 
        PyArray_CFLOAT
        PyArray_CDOUBLE
        PyArray_OBJECT
        PyArray_NTYPES
        PyArray_NOTYPE
        
    struct PyArray_Descr:
        int type_num, elsize
        char type
        
    ctypedef class numpy.ndarray [object PyArrayObject]:
        cdef char *data
        cdef int nd
        cdef int *dimensions
        cdef int *strides
        cdef object base
        cdef PyArray_Descr *descr
        cdef int flags

    ndarray PyArray_FromDims(int ndims, int* dims, int item_type)
    int PyArray_Free(object obj, char* data)

    void import_array()