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