Description of problem
I installed python(2.7.18), brian(1.4.4), and scipy(1.2.3) and then I tried to run a code in https://brian.readthedocs.io/en/stable/introduction.html. The error “TypeError: Array of type ‘long’ required. Array of type ‘long long’ given” is occurred.
Minimal code to reproduce problem
This is a code in the above link.
from brian import *
eqs='''
dv/dt = (ge+gi-(v+49*mV))/(20*ms) : volt
dge/dt = -ge/(5*ms) : volt
dgi/dt = -gi/(10*ms) : volt
'''
P=NeuronGroup(4000,model=eqs,threshold=-50*mV,reset=-60*mV)
P.v=-60*mV
Pe=P.subgroup(3200)
Pi=P.subgroup(800)
Ce=Connection(Pe,P,'ge',weight=1.62*mV,sparseness=0.02)
Ci=Connection(Pi,P,'gi',weight=-9*mV,sparseness=0.02)
M=SpikeMonitor(P)
run(1*second)
raster_plot(M)
show()
What you have aready tried
I tried to change the versions of python, brian, and scipy. But, I cannot resolve this issue.
Full traceback of error (if relevant)
Traceback (most recent call last):
File "C:/Users/chansik/github/test_brian/main.py", line 14, in <module>
run(1*second)
File "C:\ProgramData\Anaconda3\envs\brian\lib\site-packages\brian\network.py", line 938, in run
report=report, report_period=report_period)
File "C:\ProgramData\Anaconda3\envs\brian\lib\site-packages\brian\network.py", line 574, in run
self.update()
File "C:\ProgramData\Anaconda3\envs\brian\lib\site-packages\brian\network.py", line 518, in update
f()
File "C:\ProgramData\Anaconda3\envs\brian\lib\site-packages\brian\neurongroup.py", line 516, in update
self.LS.push(spikes) # Store spikes
File "C:\ProgramData\Anaconda3\envs\brian\lib\site-packages\brian\utils\ccircular\ccircular.py", line 128, in push
def push(self, *args): return _ccircular.SpikeContainer_push(self, *args)
TypeError: Array of type 'long' required. Array of type 'long long' given