python: rename setAllowNonConventionalDataTypes() / getAllowNonConventionalDataTypes() to setUseExactNumpyDtypes() / useExactNumpyDtypes()

Signed-off-by: Abhishek Gola <abhishek.gola@bigvisionllc.com>
This commit is contained in:
Abhishek Gola
2026-10-30 16:00:13 +05:30
parent 8751eb491e
commit 26bd26e400
9 changed files with 47 additions and 47 deletions

View File

@@ -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).