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
MicroClusters are inhomogeneous structures (lists, integers, ...) so when converting them to numpy array it throws an error:
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (100, 10) + inhomogeneous part.
(FedStream-main/fdstream.py", line 161, in convert_to_numpy)
In order to fix this the following has to be changed:
from:
np.asarray(MicroCluster)
to:
np.asarray(MicroCluster, dtype="object")
Maybe there is some change in the default behaviour in np.asarray
I've found 4 appearances in microcluster.py, and 4 in fdstream.py.
If you are interested I can send you a Pull request.
The text was updated successfully, but these errors were encountered:
@asieriko Thank you for your effort in helping maintain the codebase. You are absolutely right; the issue is caused by changes in behavior in the current numpy versions of np.asarray. I have accepted the pull request. I truly appreciate your contribution to maintaining the codebase.
Hello,
MicroClusters are inhomogeneous structures (lists, integers, ...) so when converting them to numpy array it throws an error:
In order to fix this the following has to be changed:
from:
np.asarray(MicroCluster)
to:
np.asarray(MicroCluster, dtype="object")
Maybe there is some change in the default behaviour in np.asarray
I've found 4 appearances in microcluster.py, and 4 in fdstream.py.
If you are interested I can send you a Pull request.
The text was updated successfully, but these errors were encountered: