numpy 2.0.0
src/multiarray/ctors.h
Go to the documentation of this file.
00001 #ifndef _NPY_ARRAY_CTORS_H_
00002 #define _NPY_ARRAY_CTORS_H_
00003 
00004 NPY_NO_EXPORT PyObject *
00005 PyArray_NewFromDescr(PyTypeObject *subtype, PyArray_Descr *descr, int nd,
00006                      intp *dims, intp *strides, void *data,
00007                      int flags, PyObject *obj);
00008 
00009 NPY_NO_EXPORT PyObject *PyArray_New(PyTypeObject *, int nd, intp *,
00010                              int, intp *, void *, int, int, PyObject *);
00011 
00012 NPY_NO_EXPORT PyObject *
00013 PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth,
00014                 int max_depth, int flags, PyObject *context);
00015 
00016 NPY_NO_EXPORT PyObject *
00017 PyArray_CheckFromAny(PyObject *op, PyArray_Descr *descr, int min_depth,
00018                      int max_depth, int requires, PyObject *context);
00019 
00020 NPY_NO_EXPORT PyObject *
00021 PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags);
00022 
00023 NPY_NO_EXPORT PyObject *
00024 PyArray_FromStructInterface(PyObject *input);
00025 
00026 NPY_NO_EXPORT PyObject *
00027 PyArray_FromInterface(PyObject *input);
00028 
00029 NPY_NO_EXPORT PyObject *
00030 PyArray_FromArrayAttr(PyObject *op, PyArray_Descr *typecode,
00031                       PyObject *context);
00032 
00033 NPY_NO_EXPORT PyObject *
00034 PyArray_EnsureArray(PyObject *op);
00035 
00036 NPY_NO_EXPORT PyObject *
00037 PyArray_EnsureAnyArray(PyObject *op);
00038 
00039 NPY_NO_EXPORT int
00040 PyArray_MoveInto(PyArrayObject *dest, PyArrayObject *src);
00041 
00042 NPY_NO_EXPORT int
00043 PyArray_CopyAnyInto(PyArrayObject *dest, PyArrayObject *src);
00044 
00045 NPY_NO_EXPORT PyObject *
00046 PyArray_CheckAxis(PyArrayObject *arr, int *axis, int flags);
00047 
00048 /* TODO: Put the order parameter in PyArray_CopyAnyInto and remove this */
00049 NPY_NO_EXPORT int
00050 PyArray_CopyAnyIntoOrdered(PyArrayObject *dst, PyArrayObject *src,
00051                                 NPY_ORDER order);
00052 
00053 /* FIXME: remove those from here */
00054 NPY_NO_EXPORT size_t
00055 _array_fill_strides(intp *strides, intp *dims, int nd, size_t itemsize,
00056                     int inflag, int *objflags);
00057 
00058 NPY_NO_EXPORT void
00059 _unaligned_strided_byte_copy(char *dst, intp outstrides, char *src,
00060                              intp instrides, intp N, int elsize);
00061 
00062 NPY_NO_EXPORT void
00063 _strided_byte_swap(void *p, intp stride, intp n, int size);
00064 
00065 NPY_NO_EXPORT void
00066 copy_and_swap(void *dst, void *src, int itemsize, intp numitems,
00067               intp srcstrides, int swap);
00068 
00069 NPY_NO_EXPORT void
00070 byte_swap_vector(void *p, intp n, int size);
00071 
00072 NPY_NO_EXPORT int
00073 PyArray_AssignFromSequence(PyArrayObject *self, PyObject *v);
00074 
00075 #endif