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

Global params can be Numpy arrays #3

Open
aleksandra-kim opened this issue Oct 20, 2017 · 3 comments
Open

Global params can be Numpy arrays #3

aleksandra-kim opened this issue Oct 20, 2017 · 3 comments
Labels
bug Something isn't working major

Comments

@aleksandra-kim
Copy link
Member

Original report by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).


Don't only validate against Number

@aleksandra-kim
Copy link
Member Author

Original comment by Pascal Lesage (Bitbucket: MPa, ).


This assumes that the array is stored in the amount field. This makes it impossible to store both the deterministic value and a sampled array. Perhaps the Numpy array needs to be stored in a new field, but then we'd have to make sure that these sampled arrays can be passed to the Interpreter.

@aleksandra-kim aleksandra-kim added major bug Something isn't working labels Mar 9, 2020
@BenPortner
Copy link
Member

@cmutel The original issue is no longer accessible. Can you reproduce it from the top of your head?

@cmutel
Copy link
Member

cmutel commented Mar 5, 2023

Sure; we currently assume that a variable can only have a single numeric value, but for computational efficiency it would be nice if they could have an array of values so that we would only need to evaluate the string formulas once to get e.g. 1000 results. But this is a bit tricky, you need a convention to make sure the numpy arrays broadcast correctly, and write the formulas so that they can accept numpy arrays with leading to everything being NaN if there is an error with one value in the whole array (e.g. if you would normalize by the sum or average).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

3 participants