Maximum value of given dtype.
(self)
| 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.""" |
no outgoing calls