Make nanops._has_infs work for additional dtypes and multidimensional arrays ( issue #7357 )