MCPcopy Create free account
hub / github.com/numpy/numpy / max

Method max

numpy/core/getlimits.py:710–720  ·  view source on GitHub ↗

Maximum value of given dtype.

(self)

Source from the content-addressed store, hash-verified

708
709 @property
710 def max(self):
711 """Maximum value of given dtype."""
712 try:
713 val = iinfo._max_vals[self.key]
714 except KeyError:
715 if self.kind == 'u':
716 val = int((1 << self.bits) - 1)
717 else:
718 val = int((1 << (self.bits-1)) - 1)
719 iinfo._max_vals[self.key] = val
720 return val
721
722 def __str__(self):
723 """String representation."""

Callers 15

multiplyFunction · 0.45
centerFunction · 0.45
ljustFunction · 0.45
rjustFunction · 0.45
zfillFunction · 0.45
fillFormatMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
binary_reprFunction · 0.45
test_math_max_minMethod · 0.45
test_endian_whereMethod · 0.45
test_swap_realMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_math_max_minMethod · 0.36
test_endian_whereMethod · 0.36
test_swap_realMethod · 0.36
test_method_argsMethod · 0.36
test_argmax_byteorderMethod · 0.36
test_attributesMethod · 0.36
test_scalar_reductionMethod · 0.36
test_minmax_blockedMethod · 0.36
test_lower_alignMethod · 0.36