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

raise Exception if array is passed for energy in calculator + typehint #533

Merged
merged 1 commit into from
May 5, 2023

Conversation

stefaanhessmann
Copy link
Collaborator

Currently the SPKCalculator converts energy to float with .numpy()[0].
If by accident one passes an array for energy (this should not be done) the calculator uses the first element and runs fine. I changed this to raising an exception for that case.

@stefaanhessmann stefaanhessmann requested a review from jnsLs May 5, 2023 12:59
@jnsLs jnsLs merged commit f1d4702 into master May 5, 2023
@jnsLs jnsLs deleted the sh/small_fix branch May 5, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants