TST: fix undefined variables hidden by unintended test method shadowing
Merge pull request #6184 from dsm054/fix-test-reshape

TST: fix test_reshape.py
BUG: bug in nanops.var with ddof=1 and 1 elements would sometimes return inf
     rather than nan on some platforms (GH6136)