Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator.data object sometimes empty after simulation. #15

Open
e2crawfo opened this issue May 25, 2016 · 0 comments
Open

Simulator.data object sometimes empty after simulation. #15

e2crawfo opened this issue May 25, 2016 · 0 comments

Comments

@e2crawfo
Copy link
Contributor

Found and explained by @adityagilra in #12. Here is the relevant text:

In simulator.py line 185, I had to modify it to check if data is not empty:

            if len(data)>0:
                if data[0].shape != true_shape:
                    data = map(
                        partial(np.reshape, newshape=true_shape), data)

I was calling sim.run() multiple times in my code and on some calls, data would be empty.

I tried reproducing this in a separate small test script, but couldn't. I thought this might be if the 'sample_every' param for a probe is larger than the 'duration' in the sim.run(duration), then data might be zero length. But this worked fine in the test script. So am unsure why this happens in my script.

@e2crawfo e2crawfo changed the title Simulator.data object sometimes empty after simulation Simulator.data object sometimes empty after simulation. May 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant