Recently, there was a case of a singular matrix error being raised where two agents appeared left in the domain, and they both had the same y-value (line 3143 in swarm.py).
This KDE stuff is a hot mess and needs to be cleaned up anyway. Suggest using a try-except clause to deal with cases rather than the current approach. And some kind of sub-function encapsulation.
Recently, there was a case of a singular matrix error being raised where two agents appeared left in the domain, and they both had the same y-value (line 3143 in swarm.py).
This KDE stuff is a hot mess and needs to be cleaned up anyway. Suggest using a try-except clause to deal with cases rather than the current approach. And some kind of sub-function encapsulation.