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
I tried to compute class and landscape metrics on a ZonalAnalysis object.
What happened: Contagion (and other metrics that rely on the adjacency matrix) produced a key error when self._adjacency_df.groupby(level=1, sort=False).sum()[i] is called.
What went wrong: self._adjacency_df.groupby(level=1, sort=False) does not produce the expected output.
What I expected to happen: Somehow the adjacency_df is malformatted, but I could not figure out what is wrong with it. I managed to "repair" it by converting it to a dict and back with adjacency_df = pd.DataFrame.from_dict(adjacency_df.to_dict()).
Description
I tried to compute class and landscape metrics on a ZonalAnalysis object.
What happened: Contagion (and other metrics that rely on the adjacency matrix) produced a key error when
self._adjacency_df.groupby(level=1, sort=False).sum()[i]
is called.What went wrong:
self._adjacency_df.groupby(level=1, sort=False)
does not produce the expected output.What I expected to happen: Somehow the adjacency_df is malformatted, but I could not figure out what is wrong with it. I managed to "repair" it by converting it to a dict and back with
adjacency_df = pd.DataFrame.from_dict(adjacency_df.to_dict())
.What I Did
The text was updated successfully, but these errors were encountered: