minor LayerList refactor to remove unneeded NumPy<=1.17 fallback code
@@ -153,15 +153,8 @@ class LayerList(SelectableEventedList[Layer]):
)
# 512 element default extent as documented in `_get_extent_world`
- try:
min_v = np.nan_to_num(min_v, nan=-0.5)
max_v = np.nan_to_num(max_v, nan=511.5)
- except TypeError:
- # In NumPy < 1.17, nan_to_num doesn't have a nan kwarg
- min_v = np.asarray(min_v)
- min_v[np.isnan(min_v)] = -0.5
- max_v = np.asarray(max_v)
- max_v[np.isnan(max_v)] = 511.5
# switch back to original order
return min_v[::-1], max_v[::-1]
