def read(self, unpickler):
    'Reconstruct the array'
    filename = os.path.join(unpickler._dirname, self.filename)
    np_ver = [int(x) for x in unpickler.np.__version__.split('.', 2)[:2]]
    allow_mmap = getattr(self, 'allow_mmap', True)
    memmap_kwargs = ({} if (not allow_mmap) else {'mmap_mode': unpickler.mmap_mode})
    array = unpickler.np.load(filename, **memmap_kwargs)
    if (hasattr(array, '__array_prepare__') and (not (self.subclass in (unpickler.np.ndarray, unpickler.np.memmap)))):
        new_array = unpickler.np.core.multiarray._reconstruct(self.subclass, (0,), 'b')
        new_array.__array_prepare__(array)
        array = new_array
    return array
Reconstruct the array
def read(self, unpickler):
    
    filename = os.path.join(unpickler._dirname, self.filename)
    np_ver = [int(x) for x in unpickler.np.__version__.split('.', 2)[:2]]
    allow_mmap = getattr(self, 'allow_mmap', True)
    memmap_kwargs = ({} if (not allow_mmap) else {'mmap_mode': unpickler.mmap_mode})
    array = unpickler.np.load(filename, **memmap_kwargs)
    if (hasattr(array, '__array_prepare__') and (not (self.subclass in (unpickler.np.ndarray, unpickler.np.memmap)))):
        new_array = unpickler.np.core.multiarray._reconstruct(self.subclass, (0,), 'b')
        new_array.__array_prepare__(array)
        array = new_array
    return array