dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
384 stars 126 forks source link

invalid value encountered in sqrt mitigation #847

Open apiszcz opened 10 months ago

apiszcz commented 10 months ago

Hello, this error is not new, probably due to my data, is there any recommended approaches to reduce or eliminate this?

Lib\site-packages\stonesoup\measures.py:259: RuntimeWarning: invalid value encountered in sqrt
  return np.sqrt(super().__call__(state1, state2))
trackestimate commented 10 months ago

I saw this in another post, would something like this be possible for measures.py?

  • if turn_rate[0] == 0:
  • turn_rate = Matrix([np.finfo(float).eps])
apiszcz commented 3 months ago

The warning is also appearing: Lib\site-packages\stonesoup\measures\state.py:260: RuntimeWarning: invalid value encountered in sqrt