a = np.arange(16).reshape((4,4))
b = rolling_window(a,(3,3))
>>>print b
array([[[[ 0, 1, 2], [ 4, 5, 6], [ 8, 9, 10]],
[[ 1, 2, 3], [ 5, 6, 7], [ 9, 10, 11]]],
[[[ 4, 5, 6], [ 8, 9, 10], [12, 13, 14]],
[[ 5, 6, 7], [ 9, 10, 11], [13, 14, 15]]]])
>>> c[:,:] = mh.features.haralick(b[:,:])
Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> c[:,:] = mh.features.haralick(b[:,:]) File "C:\Python27\lib\site-packages\mahotas\features\texture.py", line 110, in haralick raise ValueError('mahotas.texture.haralick: Can only handle 2D and 3D images.')ValueError: mahotas.texture.haralick: Can only handle 2D and 3D images.