"Fossies" - the Fresh Open Source Software Archive

Member "numpy-1.16.4/numpy/core/src/multiarray/ctors.h" (27 May 2019, 3192 Bytes) of package /linux/misc/numpy-1.16.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ctors.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef _NPY_ARRAY_CTORS_H_
    2 #define _NPY_ARRAY_CTORS_H_
    3 
    4 NPY_NO_EXPORT PyObject *
    5 PyArray_NewFromDescr(PyTypeObject *subtype, PyArray_Descr *descr, int nd,
    6                      npy_intp *dims, npy_intp *strides, void *data,
    7                      int flags, PyObject *obj);
    8 
    9 NPY_NO_EXPORT PyObject *
   10 PyArray_NewFromDescrAndBase(
   11         PyTypeObject *subtype, PyArray_Descr *descr,
   12         int nd, npy_intp *dims, npy_intp *strides, void *data,
   13         int flags, PyObject *obj, PyObject *base);
   14 
   15 NPY_NO_EXPORT PyObject *
   16 PyArray_NewFromDescr_int(PyTypeObject *subtype, PyArray_Descr *descr, int nd,
   17                          npy_intp *dims, npy_intp *strides, void *data,
   18                          int flags, PyObject *obj, PyObject *base, int zeroed,
   19                          int allow_emptystring);
   20 
   21 NPY_NO_EXPORT PyObject *PyArray_New(PyTypeObject *, int nd, npy_intp *,
   22                              int, npy_intp *, void *, int, int, PyObject *);
   23 
   24 NPY_NO_EXPORT PyObject *
   25 PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth,
   26                 int max_depth, int flags, PyObject *context);
   27 
   28 NPY_NO_EXPORT PyObject *
   29 PyArray_CheckFromAny(PyObject *op, PyArray_Descr *descr, int min_depth,
   30                      int max_depth, int requires, PyObject *context);
   31 
   32 NPY_NO_EXPORT PyObject *
   33 PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags);
   34 
   35 NPY_NO_EXPORT PyObject *
   36 PyArray_FromStructInterface(PyObject *input);
   37 
   38 NPY_NO_EXPORT PyObject *
   39 PyArray_FromInterface(PyObject *input);
   40 
   41 NPY_NO_EXPORT PyObject *
   42 PyArray_FromArrayAttr(PyObject *op, PyArray_Descr *typecode,
   43                       PyObject *context);
   44 
   45 NPY_NO_EXPORT PyObject *
   46 PyArray_EnsureArray(PyObject *op);
   47 
   48 NPY_NO_EXPORT PyObject *
   49 PyArray_EnsureAnyArray(PyObject *op);
   50 
   51 NPY_NO_EXPORT int
   52 PyArray_MoveInto(PyArrayObject *dest, PyArrayObject *src);
   53 
   54 NPY_NO_EXPORT int
   55 PyArray_CopyAnyInto(PyArrayObject *dest, PyArrayObject *src);
   56 
   57 NPY_NO_EXPORT PyObject *
   58 PyArray_CheckAxis(PyArrayObject *arr, int *axis, int flags);
   59 
   60 /* TODO: Put the order parameter in PyArray_CopyAnyInto and remove this */
   61 NPY_NO_EXPORT int
   62 PyArray_CopyAsFlat(PyArrayObject *dst, PyArrayObject *src,
   63                                 NPY_ORDER order);
   64 
   65 /* FIXME: remove those from here */
   66 NPY_NO_EXPORT void
   67 _array_fill_strides(npy_intp *strides, npy_intp *dims, int nd, size_t itemsize,
   68                     int inflag, int *objflags);
   69 
   70 NPY_NO_EXPORT void
   71 _unaligned_strided_byte_copy(char *dst, npy_intp outstrides, char *src,
   72                              npy_intp instrides, npy_intp N, int elsize);
   73 
   74 NPY_NO_EXPORT void
   75 _strided_byte_swap(void *p, npy_intp stride, npy_intp n, int size);
   76 
   77 NPY_NO_EXPORT void
   78 copy_and_swap(void *dst, void *src, int itemsize, npy_intp numitems,
   79               npy_intp srcstrides, int swap);
   80 
   81 NPY_NO_EXPORT void
   82 byte_swap_vector(void *p, npy_intp n, int size);
   83 
   84 NPY_NO_EXPORT int
   85 PyArray_AssignFromSequence(PyArrayObject *self, PyObject *v);
   86 
   87 /*
   88  * Calls arr_of_subclass.__array_wrap__(towrap), in order to make 'towrap'
   89  * have the same ndarray subclass as 'arr_of_subclass'.
   90  */
   91 NPY_NO_EXPORT PyArrayObject *
   92 PyArray_SubclassWrap(PyArrayObject *arr_of_subclass, PyArrayObject *towrap);
   93 
   94 
   95 #endif