-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1149 - bytes, bytearray types managed #1156
Conversation
//// Create ArrayOf object with appropriate dimensions and data | ||
// indexType r = dims[0]; | ||
// indexType c = dims[0] + PyArray_NDIM(pyArray); | ||
// Dimensions arrayDims(r, c); | ||
// ArrayOf res(nelsonType, arrayDims, dataPtr); | ||
// results << res; | ||
// return true; |
Check notice
Code scanning / CodeQL
Commented-out code Note
////// Get array dimensions and data pointer | ||
// npy_intp* dims = PyArray_DIMS(pyArray); | ||
// T* dataPtr = (T*)PyArray_DATA(pyArray); | ||
// ArrayOf res(nelsonType, Dimensions(1, 4), dataPtr); | ||
// results << res; | ||
// return true; |
Check notice
Code scanning / CodeQL
Commented-out code Note
// bool isarray = PyArray_Check(pyObject); | ||
// PyArrayObject* pyArray = (PyArrayObject*)pyObject; |
Check notice
Code scanning / CodeQL
Commented-out code Note
PythonType pyType = getPythonType(pyObject); | ||
switch (pyType) { | ||
case PY_NUMPY_TYPE: { | ||
PyObject* numpy = NLSPyImport_ImportModule("numpy.core._multiarray_umath"); |
Check notice
Code scanning / CodeQL
Unused local variable Note
return ArrayOf(NLS_LOGICAL, dims, ptr); | ||
void* data = (void*)pyBuffer.buf; | ||
void* ptr = (void*)ArrayOf::allocateArrayOf(nelsonType, dims.getElementCount()); | ||
ArrayOf res = ArrayOf(nelsonType, dims, ptr); |
Check notice
Code scanning / CodeQL
Declaration hides variable Note
line 541
d20dd49
to
1c8033b
Compare
No description provided.