We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b2171f commit f91e0c8Copy full SHA for f91e0c8
mahotas/features/texture.py
@@ -132,7 +132,7 @@ def haralick(f,
132
nr_dirs = len(_3d_deltas)
133
else:
134
raise ValueError('mahotas.texture.haralick: Can only handle 2D and 3D images.')
135
- fm1 = f.max() + 1
+ fm1 = int(f.max()) + 1
136
cmat = np.empty((fm1, fm1), np.int32)
137
def all_cmatrices():
138
for dir in range(nr_dirs):
mahotas/tests/test_texture.py
@@ -171,6 +171,7 @@ def test_4d_image():
171
def rand_haralick():
172
f = 255*np.random.random((128,128))
173
f = f.astype(np.uint8)
174
+ f[0, 0] = 255
175
f = mh.features.haralick(f)
176
return f.mean(0)
177
def test_feature_non_zero():
0 commit comments