add tests for nanops
minor nanops pep8 fixes
Make nanops._has_infs work for additional dtypes and multidimensional arrays ( issue #7357 )