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

[BUG] Inconsistent error messages for empty stimulus #498

Closed
mbeyeler opened this issue Jun 29, 2022 · 0 comments · Fixed by #522
Closed

[BUG] Inconsistent error messages for empty stimulus #498

mbeyeler opened this issue Jun 29, 2022 · 0 comments · Fixed by #522
Assignees
Milestone

Comments

@mbeyeler
Copy link
Member

Passing an empty stimulus to an implant & predicting a percept leads to inconsistent results, depending on how the stimulus is passed.

If called like this:

model = p2p.models.ScoreboardModel().build()
model.predict_percept(p2p.implants.ArgusII(stim=None))

the model will realize that there is no stimulus to be applied, so the output is None (no error thrown).

However, sometimes the stimulus is empty by accident, for example if dynamically built as a list or dictionary. Currently, passing stim=[] gives a "Number of electrodes provided (60) does not match the number of electrodes in the data (0)" error (which is fair, but inconsistent with the above) and passing stim={} gives a "Buffer has wrong number of dimensions (expected 2, got 1)" error (again, inconsistent).

All of these should lead to the same outcome, which is no error and None output.

@mbeyeler mbeyeler added the bug label Jun 29, 2022
@mbeyeler mbeyeler added this to the v0.9 milestone Jun 29, 2022
@tallyhawley tallyhawley self-assigned this Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants