mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
feat: update NumPy type to Mat type fail message
Output string representation of NumPy array type if it is not convertible to OpenCV Mat type
This commit is contained in:
@@ -42,7 +42,7 @@ private:
|
||||
|
||||
/**
|
||||
* Light weight RAII wrapper for `PyObject*` owning references.
|
||||
* In comparisson to C++11 `std::unique_ptr` with custom deleter, it provides
|
||||
* In comparison to C++11 `std::unique_ptr` with custom deleter, it provides
|
||||
* implicit conversion functions that might be useful to initialize it with
|
||||
* Python functions those returns owning references through the `PyObject**`
|
||||
* e.g. `PyErr_Fetch` or directly pass it to functions those want to borrow
|
||||
@@ -70,6 +70,10 @@ public:
|
||||
return &obj_;
|
||||
}
|
||||
|
||||
operator bool() {
|
||||
return static_cast<bool>(obj_);
|
||||
}
|
||||
|
||||
PyObject* release()
|
||||
{
|
||||
PyObject* obj = obj_;
|
||||
|
||||
Reference in New Issue
Block a user