mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Merge pull request #23788 from dkurt:py_scalar_assign
Change Scalar assignment in Python from single value
This commit is contained in:
@@ -327,7 +327,7 @@ bool pyopencv_to(PyObject *o, Scalar& s, const ArgInfo& info)
|
||||
}
|
||||
} else {
|
||||
if (PyFloat_Check(o) || PyInt_Check(o)) {
|
||||
s[0] = PyFloat_AsDouble(o);
|
||||
s = PyFloat_AsDouble(o);
|
||||
} else {
|
||||
failmsg("Scalar value for argument '%s' is not numeric", info.name);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user