def _condition_arg(value):
 if isinstance(value, (float, six.integer_types, complex)):
  return value
 if (isinstance(value, np.ndarray) and (value.dtype.kind in [u'i', u'f', u'c'])):
  return value
 try:
  avalue = np.array(value)
  assert (avalue.dtype.kind in [u'i', u'f', u'c'])
  return avalue
 except (ValueError, AssertionError):
  raise ValueError(u'Value not scalar compatible or convertible to an int, float, or complex array')

def _condition_arg ( value ) : if isinstance ( value , ( float , six . integer_types , complex ) ) : return value if ( isinstance ( value , np . ndarray ) and ( value . dtype . kind in [ u'i' , u'f' , u'c' ] ) ) : return value try : avalue = np . array ( value ) assert ( avalue . dtype . kind in [ u'i' , u'f' , u'c' ] ) return avalue except ( ValueError , AssertionError ) : raise ValueError ( u'Value not scalar compatible or convertible to an int, float, or complex array' )
validate value is acceptable for conversion purposes .