add try except
This commit is contained in:
parent
e821b8fa77
commit
f246c88dd6
@ -80,8 +80,11 @@ def is50or60(msg, spd_ref, trk_ref, alt_ref):
|
||||
|
||||
# since the covariance matrix is identity matrix,
|
||||
# M-dist is same as eculidian distance
|
||||
dist = np.linalg.norm(X-Mu, axis=1)
|
||||
BDS = allbds[np.nanargmin(dist)]
|
||||
try:
|
||||
dist = np.linalg.norm(X-Mu, axis=1)
|
||||
BDS = allbds[np.nanargmin(dist)]
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
return BDS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user