def _can_use_numexpr(op, op_str, a, b, dtype_check):
 if (op_str is not None):
  if (np.prod(a.shape) > _MIN_ELEMENTS):
   dtypes = set()
   for o in [a, b]:
    if hasattr(o, 'get_dtype_counts'):
     s = o.get_dtype_counts()
     if (len(s) > 1):
      return False
     dtypes |= set(s.index)
    elif isinstance(o, np.ndarray):
     dtypes |= set([o.dtype.name])
   if ((not len(dtypes)) or (_ALLOWED_DTYPES[dtype_check] >= dtypes)):
    return True
 return False

def _can_use_numexpr ( op , op_str , a , b , dtype_check ) : if ( op_str is not None ) : if ( np . prod ( a . shape ) > _MIN_ELEMENTS ) : dtypes = set ( ) for o in [ a , b ] : if hasattr ( o , 'get_dtype_counts' ) : s = o . get_dtype_counts ( ) if ( len ( s ) > 1 ) : return False dtypes |= set ( s . index ) elif isinstance ( o , np . ndarray ) : dtypes |= set ( [ o . dtype . name ] ) if ( ( not len ( dtypes ) ) or ( _ALLOWED_DTYPES [ dtype_check ] >= dtypes ) ) : return True return False
return a boolean if we will be using numexpr .