mirror of
https://github.com/opencv/opencv.git
synced 2026-09-25 04:09:57 +03:00
Merge pull request #29839 from asmorkalov:as/fix_python_types_conflict
Fixed type conflict in python bindings.
This commit is contained in:
@@ -47,8 +47,6 @@ int numpyTypeToCvDepth(int typenum)
|
|||||||
// 'long' is 64-bit on LP64 but 32-bit on LLP64, so decide by size, not by name.
|
// 'long' is 64-bit on LP64 but 32-bit on LLP64, so decide by size, not by name.
|
||||||
case NPY_LONG: return NPY_SIZEOF_LONG == 8 ? CV_64S : CV_32S;
|
case NPY_LONG: return NPY_SIZEOF_LONG == 8 ? CV_64S : CV_32S;
|
||||||
case NPY_ULONG: return NPY_SIZEOF_LONG == 8 ? CV_64U : CV_32U;
|
case NPY_ULONG: return NPY_SIZEOF_LONG == 8 ? CV_64U : CV_32U;
|
||||||
// Map the 32-bit case: it is numpy's int32 on LLP64, and output arrays cannot be cast.
|
|
||||||
case NPY_LONG: return NPY_SIZEOF_LONG == 4 ? CV_32S : -1;
|
|
||||||
case NPY_HALF: return CV_16F;
|
case NPY_HALF: return CV_16F;
|
||||||
case NPY_FLOAT: return CV_32F;
|
case NPY_FLOAT: return CV_32F;
|
||||||
case NPY_DOUBLE: return CV_64F;
|
case NPY_DOUBLE: return CV_64F;
|
||||||
|
|||||||
Reference in New Issue
Block a user