You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://github.com/environmentalscience/essm/blob/master/essm/_generator.py, EquationWriter automatically includes imports of variables contained in equations, but if the variables were defined locally in the same notebook, these imports point to __local__ and the resulting .py file cannot be imported. A way around is to first create a .py file with the exported variable definitions, then re-import all variables from that file, before running EquationWriter, but this again does not work if the files are not in the same folder, so there should be an option to exclude automatic import statements for variables in EquationWriter, so that the user can import the variables from a custom file beforehand. The downside is that equations only make sense in combination with the correct variable definitions.
The text was updated successfully, but these errors were encountered:
In https://github.com/environmentalscience/essm/blob/master/essm/_generator.py,
EquationWriter
automatically includes imports of variables contained in equations, but if the variables were defined locally in the same notebook, these imports point to__local__
and the resulting.py
file cannot be imported. A way around is to first create a.py
file with the exported variable definitions, then re-import all variables from that file, before runningEquationWriter
, but this again does not work if the files are not in the same folder, so there should be an option to exclude automatic import statements for variables inEquationWriter
, so that the user can import the variables from a custom file beforehand. The downside is that equations only make sense in combination with the correct variable definitions.The text was updated successfully, but these errors were encountered: