Skip to content

Commit

Permalink
Convert Julia type to Python type
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Oct 2, 2023
1 parent 3607d56 commit 2b612dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grpc4bmi/bmi_julia_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def get_var_type(self, name: str) -> str:
str
The Python variable type; e.g., ``str``, ``int``, ``float``.
"""
return self.implementation.get_var_type(self.state, name)
return self.implementation.get_var_type(self.state, name).lower()

def get_var_units(self, name: str) -> str:
"""Get units of the given variable.
Expand Down
3 changes: 1 addition & 2 deletions test/test_julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def model(self, cfg_file):
("get_end_time", tuple(), np.Inf),
("get_time_step", tuple(), 0.25),
("get_time_units", tuple(), "s"),
# TODO Float54 is a Julia type, not a numpy type, should use lookup table to
("get_var_type", ["plate_surface__temperature"], "Float64"),
("get_var_type", ["plate_surface__temperature"], "float64"),
("get_var_units", ["plate_surface__temperature"], "K"),
("get_var_itemsize", ["plate_surface__temperature"], 8),
("get_var_nbytes", ["plate_surface__temperature"], 384),
Expand Down

0 comments on commit 2b612dc

Please sign in to comment.