scikits-image/scikits-image — pull request #296 by ahojnnes (2012-09-03 10:42:17+00:00)
Title: Add decorator for input array check

Originally a greyscale decorator was requested. I extended this idea to a more general decorator to check all kinds of conditions. Further suggestions welcome.

This can be used in the following form:

@check_array(0, 'image', channels=1, dtype=np.uint8):
def foobar(image):
# do some foo and bar
return False