BUG: avoid a pb with nanmax in certain numpy versions
ENH: better handling mmap_mode='r'