def serialize_array(array, force_list=False):
 if isinstance(array, np.ma.MaskedArray):
  array = array.filled(np.nan)
 if (array_encoding_disabled(array) or force_list):
  return transform_array_to_list(array)
 if (not array.flags['C_CONTIGUOUS']):
  array = np.ascontiguousarray(array)
 return encode_base64_dict(array)

def serialize_array ( array , force_list = False ) : if isinstance ( array , np . ma . MaskedArray ) : array = array . filled ( np . nan ) if ( array_encoding_disabled ( array ) or force_list ) : return transform_array_to_list ( array ) if ( not array . flags [ 'C_CONTIGUOUS' ] ) : array = np . ascontiguousarray ( array ) return encode_base64_dict ( array )
transforms a numpy array into serialized form .