You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there isn't any specific type of agent, the visualization by solara would raise error because draw_orthogonal_grid (I suppose other drawing methods are the same) cannot parse the arguments generated from the function collect_agent_data. Take the orthogonal space as an example, the error is like:
File "/Users/songshgeo/Documents/VSCode/SC-20230710-SCE/.venv/lib/python3.11/site-packages/mesa/visualization/mpl_space_drawing.py", line 575, in _scatter
x = loc[:, 0]
~~~^^^^^^
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
This bug is mainly due to the lack of consideration of the scenario where a type of agent completely disappears. I am willing to open a PR to fix this bug for an orthogonal grid. However, I have not tested in higher-dimensional spaces.
The text was updated successfully, but these errors were encountered:
Woop, sorry, I didn't search the existing issue with the correct keywords. I looked at your discussion and just realized that my local solution for a 2D grid cannot be applied to other high-dimensional spaces. So, yes, I agree with redesigning the API.
When there isn't any specific type of agent, the visualization by
solara
would raise error becausedraw_orthogonal_grid
(I suppose other drawing methods are the same) cannot parse the arguments generated from the functioncollect_agent_data
. Take the orthogonal space as an example, the error is like:This bug is mainly due to the lack of consideration of the scenario where a type of agent completely disappears. I am willing to open a PR to fix this bug for an orthogonal grid. However, I have not tested in higher-dimensional spaces.
The text was updated successfully, but these errors were encountered: