TST: fix sparse test failures on Windows.

Issue was that negative numbers were produced that were then going
through astype().  Discussion on gh-3440.