Find min and max of both hemispheres
(v)
| 121 | |
| 122 | |
| 123 | def _find_color_range(v): |
| 124 | """Find min and max of both hemispheres""" |
| 125 | hemis = ['left', 'right'] |
| 126 | with warnings.catch_warnings(): |
| 127 | # not necessary to warn the user about this. NaNs won't impact anything |
| 128 | warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered') |
| 129 | vmin = np.nanmin([np.nanmin(v[h]) for h in hemis if h in v]) |
| 130 | vmax = np.nanmax([np.nanmax(v[h]) for h in hemis if h in v]) |
| 131 | return vmin, vmax |
| 132 | |
| 133 | |
| 134 | def _set_label_positions(location, rotation): |