1- from numpy .compat import os_fspath , contextlib_nullcontext , is_pathlib_path
2- from numpy .core .numeric import uint8 , ndarray , dtype
3- from numpy .core .overrides import set_module
41import numpy as np
2+ from numpy .compat import contextlib_nullcontext , is_pathlib_path , os_fspath
3+ from numpy .core .numeric import dtype , ndarray , uint8
4+ from numpy .core .overrides import set_module
55
66__all__ = ["memmap" ]
77
@@ -332,7 +332,7 @@ def flush(self):
332332 self .base .flush ()
333333
334334 def __array_wrap__ (self , arr , context = None ):
335- arr = super (memmap , self ).__array_wrap__ (arr , context )
335+ arr = super ().__array_wrap__ (arr , context )
336336
337337 # Return a memmap if a memmap was given as the output of the
338338 # ufunc. Leave the arr class unchanged if self is not a memmap
@@ -347,7 +347,7 @@ def __array_wrap__(self, arr, context=None):
347347 return arr .view (np .ndarray )
348348
349349 def __getitem__ (self , index ):
350- res = super (memmap , self ).__getitem__ (index )
350+ res = super ().__getitem__ (index )
351351 if type (res ) is memmap and res ._mmap is None :
352352 return res .view (type = ndarray )
353353 return res
0 commit comments