def hash_from_ndarray(data):
 if (not data.flags['C_CONTIGUOUS']):
  data = numpy.ascontiguousarray(data)
 return hash_from_code((((hash_from_code(data) + hash_from_code(str(data.shape))) + hash_from_code(str(data.strides))) + hash_from_code(str(data.dtype))))

def hash_from_ndarray ( data ) : if ( not data . flags [ 'C_CONTIGUOUS' ] ) : data = numpy . ascontiguousarray ( data ) return hash_from_code ( ( ( ( hash_from_code ( data ) + hash_from_code ( str ( data . shape ) ) ) + hash_from_code ( str ( data . strides ) ) ) + hash_from_code ( str ( data . dtype ) ) ) )
return a hash from an ndarray .