scipy/scipy — pull request #3083 by tacaswell (2013-11-19 16:33:05+00:00)
Title: Bug: should return 0 if no regions found

Improved the test coverage to check that the returned number of regions is correct.

Added special case above the merge logic in _ni_label.pyx

It may be better to short-circuit this earlier, but I thought this would be the minimal change.