BUG: bug in nanops.var with ddof=1 and 1 elements would sometimes return inf rather than nan (GH6136)

closes #6136