MCPcopy
hub / github.com/numpy/numpy / max

Method max

numpy/_core/getlimits.py:428–438  ·  view source on GitHub ↗

Maximum value of given dtype.

(self)

Source from the content-addressed store, hash-verified

426
427 @property
428 def max(self):
429 """Maximum value of given dtype."""
430 try:
431 val = iinfo._max_vals[self.key]
432 except KeyError:
433 if self.kind == 'u':
434 val = int((1 << self.bits) - 1)
435 else:
436 val = int((1 << (self.bits - 1)) - 1)
437 iinfo._max_vals[self.key] = val
438 return val
439
440 def __str__(self):
441 """String representation."""

Callers 15

fillFormatMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
multiplyFunction · 0.45
expandtabsFunction · 0.45
centerFunction · 0.45
ljustFunction · 0.45
rjustFunction · 0.45
zfillFunction · 0.45
replaceFunction · 0.45
partitionFunction · 0.45
rpartitionFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_max_regressionFunction · 0.36
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