Skip to content
Snippets Groups Projects
Commit 54e5309c authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Assures input numpy array is behaved, if not, copy

parent bb7c57d9
No related branches found
No related tags found
No related merge requests found
...@@ -407,7 +407,7 @@ static PyObject* PyBobIoVideoWriter_Append(PyBobIoVideoWriterObject* self, PyObj ...@@ -407,7 +407,7 @@ static PyObject* PyBobIoVideoWriter_Append(PyBobIoVideoWriterObject* self, PyObj
static char** kwlist = const_cast<char**>(const_kwlist); static char** kwlist = const_cast<char**>(const_kwlist);
PyBlitzArrayObject* frame = 0; PyBlitzArrayObject* frame = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kwlist, &PyBlitzArray_Converter, &frame)) return 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kwlist, &PyBlitzArray_BehavedConverter, &frame)) return 0;
if (frame->ndim != 3 && frame->ndim != 4) { if (frame->ndim != 3 && frame->ndim != 4) {
PyErr_Format(PyExc_ValueError, "input array should have 3 or 4 dimensions, but you passed an array with %" PY_FORMAT_SIZE_T "d dimensions", frame->ndim); PyErr_Format(PyExc_ValueError, "input array should have 3 or 4 dimensions, but you passed an array with %" PY_FORMAT_SIZE_T "d dimensions", frame->ndim);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment