def _check_input(opens, closes, highs, lows, miss=(-1)):
 def _missing(sequence, miss=(-1)):
  u'Returns the index in *sequence* of the missing data, identified by\n        *miss*\n\n        Parameters\n        ----------\n        sequence :\n            sequence to evaluate\n        miss :\n            identifier of the missing data\n\n        Returns\n        -------\n        where_miss: numpy.ndarray\n            indices of the missing data\n        '
  return np.where((np.array(sequence) == miss))[0]
 same_length = (len(opens) == len(highs) == len(lows) == len(closes))
 _missopens = _missing(opens)
 same_missing = ((_missopens == _missing(highs)).all() and (_missopens == _missing(lows)).all() and (_missopens == _missing(closes)).all())
 if (not (same_length and same_missing)):
  msg = u'*opens*, *highs*, *lows* and *closes* must have the same length. NOTE: this code assumes if any value open, high, low, close is missing (*-1*) they all must be missing.'
  raise ValueError(msg)

def _check_input ( opens , closes , highs , lows , miss = ( - 1 ) ) : def _missing ( sequence , miss = ( - 1 ) ) : return np . where ( ( np . array ( sequence ) == miss ) ) [ 0 ] same_length = ( len ( opens ) == len ( highs ) == len ( lows ) == len ( closes ) ) _missopens = _missing ( opens ) same_missing = ( ( _missopens == _missing ( highs ) ) . all ( ) and ( _missopens == _missing ( lows ) ) . all ( ) and ( _missopens == _missing ( closes ) ) . all ( ) ) if ( not ( same_length and same_missing ) ) : msg = u'*opens*, *highs*, *lows* and *closes* must have the same length. NOTE: this code assumes if any value open, high, low, close is missing (*-1*) they all must be missing.' raise ValueError ( msg )
checks that *opens* .