-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
If I define an expression in a variable definition, VariableWriter does not import it automatically and it has to be added manually as supplementary_imports. In https://github.com/environmentalscience/essm/blob/master/docs/examples/api_features.ipynb, In[14], the following definition was made:
class Delta_Pwa(Variable):
"""Slope of saturated vapour pressure, $\partial P_{wa} / \partial T_g$"""
expr = Derivative(P_wa,T_g)
latex_name = r'\Delta'However, Derivative is not imported when executing:
writer_var = VariableWriter(docstring='Test of VariableWriter.')
writer_var.var(Delta_Pwa)This is because extract_functions() in https://github.com/environmentalscience/essm/blob/master/essm/_generator.py is only used in EquationWriter but not in VariableWriter.
Metadata
Metadata
Assignees
Labels
No labels