mirror of
https://github.com/opencv/opencv.git
synced 2026-11-14 12:18:09 -06:00
python: rename setAllowNonConventionalDataTypes() / getAllowNonConventionalDataTypes() to setUseExactNumpyDtypes() / useExactNumpyDtypes()
Signed-off-by: Abhishek Gola <abhishek.gola@bigvisionllc.com>
This commit is contained in:
@@ -370,8 +370,8 @@ PyObject* pyopencv_from(const cv::Mat& m)
|
||||
Py_INCREF(o);
|
||||
return o;
|
||||
}
|
||||
if( getAllowNonConventionalDataTypes() )
|
||||
CV_LOG_ONCE_WARNING(NULL, "Python bindings: non-conventional data types are allowed, "
|
||||
if( useExactNumpyDtypes() )
|
||||
CV_LOG_ONCE_WARNING(NULL, "Python bindings: setUseExactNumpyDtypes(True) is set, "
|
||||
"but NumPy does not know bfloat16 / float8 and they are returned as float32. "
|
||||
"Import ml_dtypes to keep the exact dtype.");
|
||||
// NumPy alone cannot name these; widen to float32 (lossless).
|
||||
|
||||
Reference in New Issue
Block a user