Description
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 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.