(ntypes)
| 19 | dtype = np.dtype('O') |
| 20 | |
| 21 | def print_cancast_table(ntypes): |
| 22 | print('X', end=' ') |
| 23 | for char in ntypes: |
| 24 | print(char, end=' ') |
| 25 | print() |
| 26 | for row in ntypes: |
| 27 | print(row, end=' ') |
| 28 | for col in ntypes: |
| 29 | if np.can_cast(row, col, "equiv"): |
| 30 | cast = "#" |
| 31 | elif np.can_cast(row, col, "safe"): |
| 32 | cast = "=" |
| 33 | elif np.can_cast(row, col, "same_kind"): |
| 34 | cast = "~" |
| 35 | elif np.can_cast(row, col, "unsafe"): |
| 36 | cast = "." |
| 37 | else: |
| 38 | cast = " " |
| 39 | print(cast, end=' ') |
| 40 | print() |
| 41 | |
| 42 | def print_coercion_table(ntypes, inputfirstvalue, inputsecondvalue, firstarray, use_promote_types=False): |
| 43 | print('+', end=' ') |
no test coverage detected