~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/doc/pyrex/c_numpy.pxd

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# :Author:    Robert Kern
 
2
# :Copyright: 2004, Enthought, Inc.
 
3
# :License:   BSD Style
 
4
 
 
5
 
 
6
cdef extern from "numpy/arrayobject.h":
 
7
    ctypedef enum PyArray_TYPES:
 
8
        PyArray_BOOL
 
9
        PyArray_BYTE
 
10
        PyArray_UBYTE
 
11
        PyArray_SHORT
 
12
        PyArray_USHORT 
 
13
        PyArray_INT
 
14
        PyArray_UINT 
 
15
        PyArray_LONG
 
16
        PyArray_ULONG
 
17
        PyArray_LONGLONG
 
18
        PyArray_ULONGLONG
 
19
        PyArray_FLOAT
 
20
        PyArray_DOUBLE 
 
21
        PyArray_LONGDOUBLE
 
22
        PyArray_CFLOAT
 
23
        PyArray_CDOUBLE
 
24
        PyArray_CLONGDOUBLE
 
25
        PyArray_OBJECT
 
26
        PyArray_STRING
 
27
        PyArray_UNICODE
 
28
        PyArray_VOID
 
29
        PyArray_NTYPES
 
30
        PyArray_NOTYPE
 
31
 
 
32
    ctypedef int intp 
 
33
 
 
34
    ctypedef extern class numpy.dtype [object PyArray_Descr]:
 
35
        cdef int type_num, elsize, alignment
 
36
        cdef char type, kind, byteorder, hasobject
 
37
        cdef object fields, typeobj
 
38
 
 
39
    ctypedef extern class numpy.ndarray [object PyArrayObject]:
 
40
        cdef char *data
 
41
        cdef int nd
 
42
        cdef intp *dimensions
 
43
        cdef intp *strides
 
44
        cdef object base
 
45
        cdef dtype descr
 
46
        cdef int flags
 
47
 
 
48
    ndarray PyArray_SimpleNew(int ndims, intp* dims, int item_type)
 
49
    int PyArray_Check(object obj)
 
50
    ndarray PyArray_ContiguousFromObject(object obj, PyArray_TYPES type, 
 
51
        int mindim, int maxdim)
 
52
    intp PyArray_SIZE(ndarray arr)
 
53
    void *PyArray_DATA(ndarray arr)
 
54
    ndarray PyArray_FromAny(object obj, dtype newtype, int mindim, int maxdim,
 
55
                    int requirements, object context)
 
56
    ndarray PyArray_NewFromDescr(object subtype, dtype newtype, int nd, intp* dims,
 
57
                    intp* strides, void* data, int flags, object parent)
 
58
 
 
59
    void import_array()