make nanops work when ndim==1 and axis==0 ( issue #7354 )

This fixes issue #7354, where some ``nanops`` functions fail for 1-dimensional arrays for the argument ``axis=0``.