def _strided_from_memmap(filename, dtype, mode, offset, order, shape, strides, total_buffer_len):
 if (mode == 'w+'):
  mode = 'r+'
 if (strides is None):
  return np.memmap(filename, dtype=dtype, shape=shape, mode=mode, offset=offset, order=order)
 else:
  base = np.memmap(filename, dtype=dtype, shape=total_buffer_len, mode=mode, offset=offset, order=order)
  return as_strided(base, shape=shape, strides=strides)

def _strided_from_memmap ( filename , dtype , mode , offset , order , shape , strides , total_buffer_len ) : if ( mode == 'w+' ) : mode = 'r+' if ( strides is None ) : return np . memmap ( filename , dtype = dtype , shape = shape , mode = mode , offset = offset , order = order ) else : base = np . memmap ( filename , dtype = dtype , shape = total_buffer_len , mode = mode , offset = offset , order = order ) return as_strided ( base , shape = shape , strides = strides )
reconstruct an array view on a memory mapped file .