Vector Values
Posted: Tue Feb 25, 2020 2:50 pm
I am working with the model. Passing different values of GNABAR, GKBAR; GL, EL into the model and plotting the results of voltage change. The problem I am having is I cannot save this voltage value to the csv format because its in the vector from
The above is the code that I am using to run the model with different values and appending all the values in the list.
above Code for writing the file that I copied from neuron website.
The above code is also from the neuron website. And I get the error that is
Code: Select all
%%time
t = []
v = []
i = []
for row in range(data_with_sampling.shape[0]):
t_, v_, i_ = run_one_sim(data_with_sampling.iloc[row, :].values)
t.append(t_)
v.append(v_)
i.append(i_)
Code: Select all
import csv
with open('data.csv', 'w') as f:
csv.writer(f).writerows(zip(t, v))
Code: Select all
with open('data.csv') as f:
reader = csv.reader(f)
tnew, vnew = zip(*[[float(val) for val in row] for row in reader if row])
I don't understand how to fix this and what I am doing wrong. Any help will be appreciated.ValueError: could not convert string to float: 'Vector[3780]'