Returns True if type is 1 or 2 and z is explicitly defined in kwargs.
552982
def _has_z(self, kwargs):
        '''
        
        '''
        return ((self._type == 1 or self._type ==2) and
                (('z' in kwargs) or (self._element_z in kwargs)))
886835
private boolean checkForMapValue(TabularType pType) {
        CompositeType rowType = pType.getRowType();
        // Two entries in the row: "key" and "value"
        return rowType.containsKey(TD_KEY_VALUE) && rowType.containsKey(TD_KEY_KEY) && rowType.keySet().size() == 2;
    }
596376
private boolean validTemplateTypeOfExpression(Node expr) {
    // The expression must have three children. The templateTypeOf keyword, a
    // templatized type and an index
    if (!checkParameterCount(expr, Keywords.TEMPLATETYPEOF)) {
      return false;
    }
    // The parameter must be a valid type expression
    if (!validTypeTransformationExpression(getCallArgument(expr, 0))) {
      warnInvalidInside(Keywords.TEMPLATETYPEOF.name, expr);
      return false;
    }
    if (!getCallArgument(expr, 1).isNumber()) {
      warnInvalid("index", expr);
      warnInvalidInside(Keywords.TEMPLATETYPEOF.name, expr);
      return false;
    }
    double index = getCallArgument(expr, 1).getDouble();
    if (index < 0 || index % 1 != 0) {
      warnInvalid("index", expr);
      warnInvalidInside(Keywords.TEMPLATETYPEOF.name, expr);
      return false;
    }
    return true;
  }
1156054
def has_linguist_kwargs(self, kwargs):
        
        for k in kwargs:
            if self.is_linguist_lookup(k):
                return True
        return False
1209487
private boolean validRawTypeOfTypeExpression(Node expr) {
    // The expression must have two children. The rawTypeOf keyword and the
    // parameter
    if (!checkParameterCount(expr, Keywords.RAWTYPEOF)) {
      return false;
    }
    // The parameter must be a valid type expression
    if (!validTypeTransformationExpression(getCallArgument(expr, 0))) {
      warnInvalidInside(Keywords.RAWTYPEOF.name, expr);
      return false;
    }
    return true;
  }
218189
public static boolean isNumber(Type t)
  {
    for(int i = 0; i < NUMERICAL_TYPES.length; i++) {
      if(NUMERICAL_TYPES[i] == t) {
        return true;
      }
    }
    return false;
  }
643873
private static boolean isLogicalMapType(Type groupType)
  {
    OriginalType ot = groupType.getOriginalType();
    if (groupType.isPrimitive() || ot == null || groupType.isRepetition(Type.Repetition.REPEATED)) {
      return false;
    }
    if (groupType.getOriginalType().equals(OriginalType.MAP) ||
        groupType.getOriginalType().equals(OriginalType.MAP_KEY_VALUE)) {
      GroupType myMapType = groupType.asGroupType();
      if (myMapType.getFieldCount() != 1 || myMapType.getFields().get(0).isPrimitive()) {
        return false;
      }
      GroupType mapItemType = myMapType.getFields().get(0).asGroupType();
      return mapItemType.isRepetition(Type.Repetition.REPEATED) &&
             mapItemType.getFieldCount() == 2 &&
             mapItemType.getFields().get(0).getName().equalsIgnoreCase("key") &&
             mapItemType.getFields().get(0).isPrimitive() &&
             mapItemType.getFields().get(1).getName().equalsIgnoreCase("value");
    }
    return false;
  }
1274289
def orthogonal(*args) -> bool:
    
    for i, arg in enumerate(args):
        if hasattr(arg, "shape"):
            args[i] = arg.shape
    for s in zip(*args):
        if np.product(s) != max(s):
            return False
    return True
286815
def _is_simple_type(value):
    '''
    
    '''
    return isinstance(value, six.string_types) or isinstance(value, int) or isinstance(value, float) or isinstance(value, bool)
684927
def is_same(type1, type2):
    """"""
    nake_type1 = remove_declarated(type1)
    nake_type2 = remove_declarated(type2)
    return nake_type1 == nake_type2
425388
public static boolean isBasicType(Class<?> clazz) {
		if (null == clazz) {
			return false;
		}
		return (clazz.isPrimitive() || isPrimitiveWrapper(clazz));
	}
493986
private function isNumeric()
    {
        foreach (array_keys($this->options) as $key) {
            if (!is_int($key)) {
                return false;
            }
        }

        return true;
    }
359107
def is_int(arg):
    '''
    
    '''
    return (is_int(mag(arg)) if is_quantity(arg)                   else
            True             if isinstance(arg, six.integer_types) else
            is_npscalar(arg, 'int') or is_npvalue(arg, 'int'))
496134
function() {
      var count = _.size(arguments);
      if (count === 1) return true;
      if (count === 2) return arguments[0] < arguments[1];

      for (var i = 1; i < count; i++) {
        if (arguments[i-1] >= arguments[i]) {
          return false;
        }
      }

      return true;
    }
457233
def is_number(arg):
    '''
    
    '''
    return (is_number(mag(arg)) if is_quantity(arg)              else
            is_npscalar(arg, 'number') or is_npvalue(arg, 'number'))
235357
public boolean isTypeGenerifiedBy(String type) {
        if (typeGenericName.length > 2 && typeGenericName[2].equals(type)) {
            return true;
        }
        if (typeGenericName.length > 1 && typeGenericName[1].equals(type)) {
            return true;
        }
        if (typeGenericName.length > 0 && typeGenericName[0].equals(type)) {
            return true;
        }
        return false;
    }
550564
def isuncertainties(arg_list):
    
    for arg in arg_list:
        if isinstance(arg, (list, tuple)) and isinstance(arg[0], uct.UFloat):
            return True
        elif isinstance(arg, np.ndarray) and isinstance(
                np.atleast_1d(arg)[0], uct.UFloat):
            return True
        elif isinstance(arg, (float, uct.UFloat)) and \
                isinstance(arg, uct.UFloat):
            return True
    return False