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
After making efforts to run the multimodel custom model of Jansen-Rit and thalamus, I have been keeping on receiving errors that are possibly related to deprecation issues. A common issue is that newer numpy versions have changed usage of np.objects to objects.
Here some errors:
File ~\PycharmProjects\wholebrainsim\venv\Lib\site-packages\neurolib\models\multimodel\builder\base\network.py:439, in SingleCouplingExcitatoryInhibitoryNode.init_node(self, **kwargs)
437 # gather inputs form this node - assumes constant delays
438 var_idx = 0
--> 439 self.inputs = np.zeros_like(self.connectivity, dtype=np.object)
440 # iterate over masses as from, hence columns
441 for from_mass, mass in enumerate(self.masses):
442 # iterate over indices as to, hence rows
AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe.
The text was updated successfully, but these errors were encountered:
For some reason there is a discrepancy between the code on the GitHub (v0.6.1) and the latest release (v0.6.2). In 0.6.2 the SingleCouplingExcitatoryInhibitoryNode class in the network.py file calls np.object when it should just be calling object. I think just install the library directly from the repo instead of using pip gets around it, but then you are missing some other changes I guess, otherwise you can just edit the code yourself by deleting the four characters.
After making efforts to run the multimodel custom model of Jansen-Rit and thalamus, I have been keeping on receiving errors that are possibly related to deprecation issues. A common issue is that newer numpy versions have changed usage of np.objects to objects.
Here some errors:
ValueError Traceback (most recent call last)
File ~\PycharmProjects\wholebrainsim\venv\Lib\site-packages\scipy\signal\windows_windows.py:2344, in get_window(window, Nx, fftbins)
2343 try:
-> 2344 beta = float(window)
2345 except (TypeError, ValueError) as e:
ValueError: could not convert string to float: 'hanning'
During handling of the above exception, another exception occurred:
SC = np.array([[0.0, 0.15], [6., 0.0]])
delays = np.array([[0.0, 13.0], [13.0, 0.0]]) # thalamocortical delay = 13ms
thalamocortical = MultiModel(JansenRitThalamusMiniNetwork(connectivity_matrix=SC, delay_matrix=delays, seed=42))
display(thalamocortical.model_instance.describe())
Traceback leading to the following:
File ~\PycharmProjects\wholebrainsim\venv\Lib\site-packages\neurolib\models\multimodel\builder\base\network.py:439, in SingleCouplingExcitatoryInhibitoryNode.init_node(self, **kwargs)
437 # gather inputs form this node - assumes constant delays
438 var_idx = 0
--> 439 self.inputs = np.zeros_like(self.connectivity, dtype=np.object)
440 # iterate over masses as
from
, hence columns441 for from_mass, mass in enumerate(self.masses):
442 # iterate over indices as
to
, hence rowsAttributeError: module 'numpy' has no attribute 'object'.
np.object
was a deprecated alias for the builtinobject
. To avoid this error in existing code, useobject
by itself. Doing this will not modify any behavior and is safe.The text was updated successfully, but these errors were encountered: