Get `NUMERIC VALUE` property.
324074
def get_numeric_value_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_numeric_values if is_bytes else unidata.unicode_numeric_values

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['numericvalue'].get(negated, negated)
    else:
        value = unidata.unicode_alias['numericvalue'].get(value, value)

    return obj[value]
171202
def r_num(obj):
    """"""
    if isinstance(obj, (list, tuple)):
        it = iter
    else:
        it = LinesIterator
    dataset = Dataset([Dataset.FLOAT])
    return dataset.load(it(obj))
236329
def parse_numeric(self):
        """"""
        word = ''
        frac = False

        if self.char == '-':
            word += self.char
            self.update_chars()

        while self.char.isdigit() or (self.char == '.' and not frac):
            # Only allow one decimal point
            if self.char == '.':
                frac = True
            word += self.char
            self.update_chars()

        # Check for float exponent
        if self.char in 'eEdD':
            word += self.char
            self.update_chars()

        if self.char in '+-':
            word += self.char
            self.update_chars()
        while self.char.isdigit():
            word += self.char
            self.update_chars()

        return word
37136
def load(self, value):
        """"""
        if self.property_type is None:
            return value
        elif not isinstance(self.property_type, BaseType):
            raise TypeError('property_type must be schematics BaseType')
        else:
            native_value = self.property_type.to_native(value)
            self.property_type.validate(native_value)
            return native_value
824052
def p_numeric_literal(self, p):
        """"""
        p[0] = self.asttypes.Number(p[1])
        p[0].setpos(p)
567086
def numprop(value, propertyexpected):
    
    if propertyexpected == 'triangular':
        x = (math.sqrt(8 * value + 1) - 1) / 2
        return bool(x - int(x) > 0)
    elif propertyexpected == 'square':
        return math.sqrt(value).is_integer()
    elif propertyexpected == 'cube':
        x = value**(1 / 3)
        x = int(round(x))
        return bool(x**3 == value)
    elif propertyexpected == 'even':
        return value % 2 == 0
    elif propertyexpected == 'odd':
        return not value % 2 == 0
    elif propertyexpected == 'positive':
        return bool(value > 0)
    elif propertyexpected == 'negative':
        return bool(value < 0)
    elif propertyexpected == 'zero':
        return bool(value == 0)
739430
def _value(self, obj, cls=None):
        """"""
        if obj is not None:
            return getattr(obj, self.propname)
        else:
            return getattr(cls, self.propname)
1301153
def get_age_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_age if is_bytes else unidata.unicode_age

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['age'].get(negated, negated)
    else:
        value = unidata.unicode_alias['age'].get(value, value)

    return obj[value]
501784
def get_int(self, key, default=None):
        
        """
        return self.get_converted(
            key, ConversionTypeEnum.INTEGER, default=default)
1144806
def decimal(self, var, default=NOTSET, force=True):
        
        return self._get(var, default=default, cast=Decimal, force=force)
1291635
private int getIntProperty(Properties prop, String name) {
        String propertyValue = prop.getProperty(name);
        return Integer.parseInt(propertyValue);
    }
533742
def getValue(self, unit=None):
        

        if unit or self.unit:
            r = float(self.value * UnitToValue(self.unit)) / UnitToValue(unit)
            return int(round(r)) if isinstance(self.value, int) else r
        return self.value
1167977
function num(type, value) {
  var val;
  if(type === NUMERIC.INTEGER) {
    val = utils.strtoint(value);
    if(isNaN(val)) throw IntegerRange;
  }else{
    val = utils.strtofloat(value);
    if(isNaN(val)) throw InvalidFloat;
  }
  return val;
}
98002
def is_numeric(value):
        
        return type(value) in [
            int,
            float,
            
            np.int8,
            np.int16,
            np.int32,
            np.int64,

            np.float16,
            np.float32,
            np.float64,
            np.float128
        ]
132892
def is_numeric(self, value, strict=False):
        """"""
        value = stringify(value)
        if value is not None:
            if value.isnumeric():
                return
        self.shout('value %r is not numeric', strict, value)
574380
public int numValues(String property) {
		int count = 0;
		if (has()) {
			TResult result = queryForValues(property);
			try {
				count = result.getCount();
			} finally {
				result.close();
			}
		}
		return count;
	}
585929
def value(self, data):
        """"""
        value = data.get(self.name)
        if value:
            return int(value)
        return self.default