-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/distributions part2 #7
Conversation
… angular distributions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Questions]
Are there no equivalent Python tests for the energy-angle evaluation?
Do operators like chunk(energy, angle)
work with numpy.ndarray
inputs or do you have to construct an numpy.vectorize
object?
Otherwise, looks good.
Edit: I see now, the Python interface is in part 3.
chunk(energy, angle) is a function call that interpolates on the the data. |
I meant more in this sense: import numpy as np
e_vals = np.logspace(-5, 8, 100)
mu_vals = np.linspace(-1, 1, 50)
e_mesh, mu_mesh = np.meshgrid(e_vals, mu_vals)
val = chunk(e_mesh, mu_mesh) If it's only a scalar argument, I could just do chunk_vecfun = np.vectorize(chunk)
val = chunk_vecfun(e_mesh, mu_mesh) |
Oh, that's an interesting use case. The function is specifically only for scalar arguments, and only returns a double. I won't be able to do it with the call operator - as C++ requires the same return type when using operator overloading. Still, I'll look into it. |
This PR adds the following one dimensional function components:
This PR adds the following two dimensional function components:
This is based on the latest scion developments