Fix issue with nans
This commit is contained in:
parent
020adebfd3
commit
5a33561abb
@ -85,6 +85,7 @@ class BasePolicy(Policy):
|
|||||||
# The next line prints a warning since some voxels have no grasp
|
# The next line prints a warning since some voxels have no grasp
|
||||||
# predictions resulting in empty slices.
|
# predictions resulting in empty slices.
|
||||||
qual = np.mean(self.qual_hist[:T, ...], axis=0, where=mask)
|
qual = np.mean(self.qual_hist[:T, ...], axis=0, where=mask)
|
||||||
|
qual = np.nan_to_num(qual, copy=False)
|
||||||
qual = threshold_quality(qual, 0.9)
|
qual = threshold_quality(qual, 0.9)
|
||||||
index_list = select_local_maxima(qual, 3)
|
index_list = select_local_maxima(qual, 3)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user