def _reduce_memmap_backed(a, m):
 (a_start, a_end) = np.byte_bounds(a)
 m_start = np.byte_bounds(m)[0]
 offset = (a_start - m_start)
 offset += m.offset
 if m.flags['F_CONTIGUOUS']:
  order = 'F'
 else:
  order = 'C'
 if (a.flags['F_CONTIGUOUS'] or a.flags['C_CONTIGUOUS']):
  strides = None
  total_buffer_len = None
 else:
  strides = a.strides
  total_buffer_len = ((a_end - a_start) // a.itemsize)
 return (_strided_from_memmap, (m.filename, a.dtype, m.mode, offset, order, a.shape, strides, total_buffer_len))

def _reduce_memmap_backed ( a , m ) : ( a_start , a_end ) = np . byte_bounds ( a ) m_start = np . byte_bounds ( m ) [ 0 ] offset = ( a_start - m_start ) offset += m . offset if m . flags [ 'F_CONTIGUOUS' ] : order = 'F' else : order = 'C' if ( a . flags [ 'F_CONTIGUOUS' ] or a . flags [ 'C_CONTIGUOUS' ] ) : strides = None total_buffer_len = None else : strides = a . strides total_buffer_len = ( ( a_end - a_start ) // a . itemsize ) return ( _strided_from_memmap , ( m . filename , a . dtype , m . mode , offset , order , a . shape , strides , total_buffer_len ) )
pickling reduction for memmap backed arrays .