mirror of
https://github.com/opencv/opencv.git
synced 2026-11-14 21:40:06 -06:00
fix(python): handle byte-swapped NumPy inputs on 5.x
This commit is contained in:
@@ -148,7 +148,7 @@ bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo& info)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool needcopy = false, needcast = false;
|
||||
bool needcopy = !PyArray_ISNOTSWAPPED(oarr), needcast = needcopy;
|
||||
int typenum = PyArray_TYPE(oarr), new_typenum = typenum;
|
||||
int type = numpyTypeToCvDepth(typenum);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user