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