mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-20 12:40:31 +08:00
added test: labelled image must be of integer type
This commit is contained in:
@@ -186,6 +186,9 @@ def regionprops(image, properties='all'):
|
||||
cdef np.ndarray[np.double_t, ndim=2] m, mu, nu
|
||||
cdef double cr, cc, a, b, c
|
||||
|
||||
if not np.issubdtype(image.dtype, 'int'):
|
||||
raise TypeError('labelled image must be of integer dtype')
|
||||
|
||||
# determine all properties if nothing specified
|
||||
if properties == 'all':
|
||||
properties = PROPS
|
||||
|
||||
Reference in New Issue
Block a user