File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/pybamm/expression_tree/operations Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -479,11 +479,7 @@ def load_custom_model(filename: str) -> pybamm.BaseModel:
479479 raise KeyError (f"Missing required model sections: { missing } " )
480480
481481 battery_model = model_data .get ("base_class" )
482- if (
483- not battery_model
484- or battery_model .isspace ()
485- or battery_model == "pybamm.BaseModel"
486- ):
482+ if not battery_model or battery_model .strip () == "pybamm.BaseModel" :
487483 base_cls = pybamm .BaseModel
488484 else :
489485 module_name , class_name = battery_model .rsplit ("." , 1 )
@@ -763,7 +759,9 @@ def _convert_options(self, d):
763759 return d
764760
765761 @staticmethod
766- def convert_symbol_to_json (symbol : pybamm .Symbol ) -> dict [str , Any ]:
762+ def convert_symbol_to_json (
763+ symbol : pybamm .Symbol | numbers .Number | list ,
764+ ) -> dict [str , Any ] | numbers .Number | list :
767765 """
768766 Recursively converts a PyBaMM symbolic expression into a JSON-serializable format.
769767
You can’t perform that action at this time.
0 commit comments