Closed chrishavlin closed 3 years ago
Was trying to load a dataset with lots of nans and was getting the following error:
/home/chris/src/yt_/yt_idv/yt_idv/scene_data/block_collection.py:59: RuntimeWarning: All-NaN axis encountered self.min_val = min(self.min_val, np.nanmin(np.abs(block.my_data[0]).min())) /home/chris/src/yt_/yt_idv/yt_idv/scene_data/block_collection.py:60: RuntimeWarning: All-NaN axis encountered self.max_val = max(self.max_val, np.nanmax(np.abs(block.my_data[0]).max())) /home/chris/src/yt_/yt_idv/yt_idv/scene_data/block_collection.py:123: RuntimeWarning: invalid value encountered in true_divide n_data = (n_data - self.min_val) / (
Switching the order of the nanmin (nanmax) and min (max) operations fixed it.
nanmin
nanmax
min
max
Was trying to load a dataset with lots of nans and was getting the following error:
Switching the order of the
nanmin
(nanmax
) andmin
(max
) operations fixed it.