Replies: 1 comment 5 replies
-
Can you post a minimal example with the external function please |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to use reaktoro to calculate some parameters.
e.g. I have my parameter defined as:
ocp = FunctionParameter('OCP',inputs)
in my parameter values I have some like this:
parametervalues['ocp']= _ocp_fn
def _ocp_fn(c,T): return _external_fn(c,T)
_external_fn accepts two floats and returns a float.
This does not work since c,T, are not float but some pybamm symbols, if I try
.evalaute()
orfloat
the functions works if the input are scalars but not if they are broadcasts. If I wrap _external_fn with np.frompyfunc I getAttributeError: module 'pybamm' has no attribute ...
.I am kind of lost how to calculate parameters from an external software.
Beta Was this translation helpful? Give feedback.
All reactions