mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-21 16:09:22 +00:00
minor cleanups in numpy.h, updated gitignore file for ninja
This commit is contained in:
parent
8a49f776b5
commit
36dec17883
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,3 +20,6 @@ CTestTestfile.cmake
|
|||||||
Testing
|
Testing
|
||||||
autogen
|
autogen
|
||||||
MANIFEST
|
MANIFEST
|
||||||
|
/.ninja_*
|
||||||
|
/*.ninja
|
||||||
|
/docs/.build
|
||||||
|
@ -32,9 +32,9 @@ public:
|
|||||||
API_PyArray_NewFromDescr = 94,
|
API_PyArray_NewFromDescr = 94,
|
||||||
NPY_C_CONTIGUOUS = 0x0001,
|
NPY_C_CONTIGUOUS = 0x0001,
|
||||||
NPY_F_CONTIGUOUS = 0x0002,
|
NPY_F_CONTIGUOUS = 0x0002,
|
||||||
NPY_NPY_ARRAY_FORCECAST = 0x0010,
|
NPY_ARRAY_FORCECAST = 0x0010,
|
||||||
NPY_ENSURE_ARRAY = 0x0040,
|
NPY_ENSURE_ARRAY = 0x0040,
|
||||||
NPY_BOOL=0,
|
NPY_BOOL = 0,
|
||||||
NPY_BYTE, NPY_UBYTE,
|
NPY_BYTE, NPY_UBYTE,
|
||||||
NPY_SHORT, NPY_USHORT,
|
NPY_SHORT, NPY_USHORT,
|
||||||
NPY_INT, NPY_UINT,
|
NPY_INT, NPY_UINT,
|
||||||
@ -136,7 +136,7 @@ public:
|
|||||||
PyObject *descr = api.PyArray_DescrFromType(npy_format_descriptor<T>::value);
|
PyObject *descr = api.PyArray_DescrFromType(npy_format_descriptor<T>::value);
|
||||||
return api.PyArray_FromAny(ptr, descr, 0, 0,
|
return api.PyArray_FromAny(ptr, descr, 0, 0,
|
||||||
API::NPY_C_CONTIGUOUS | API::NPY_ENSURE_ARRAY |
|
API::NPY_C_CONTIGUOUS | API::NPY_ENSURE_ARRAY |
|
||||||
API::NPY_NPY_ARRAY_FORCECAST, nullptr);
|
API::NPY_ARRAY_FORCECAST, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user