soft-matter/trackpy — pull request #59 by danielballan (2014-02-06 13:55:40+00:00)
Title: ENH: Explicitly check for black image and fail informatively.

The problem in #56 was in pims, but trackpy made is confusing by failing inside ``scipy.stats.scoreatpercentile``, like so:

The problem was in pims, but clearly trackpy could be handling this error more nicely:

In [1]: black_image = np.zeros((100, 100))

In [2]: import trackpy as tp

In [3]: tp.locate(black_image, 5)
ValueError: operands could not be broadcast together with shapes (0) (2)

With this PR, we get instead:

In [3]: tp.locate(black_image, 5)
ValueError: Image is completely black.