Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 21, 2024
1 parent 91b26d5 commit 24cffe0
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions python/units_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,27 @@ NB_MODULE(units_llnl_ext, mod)
"check if the unit can be converted to the desired unit")
.def(
"convert",
[](units::precise_unit* unit, double value, const units::precise_unit& convert_to_units) {
return units::convert(value,*unit,convert_to_units);
}, "value"_a,
"unit_out"_a,
"value represented by one unit in terms of another")
[](units::precise_unit* unit,
double value,
const units::precise_unit& convert_to_units) {
return units::convert(value, *unit, convert_to_units);
},
"value"_a,
"unit_out"_a,
"value represented by one unit in terms of another")
.def(
"convert",
[](units::precise_unit* unit, double value, const char *convert_to_units) {
return units::convert(value,*unit,units::unit_from_string(std::string(convert_to_units)));
}, "value"_a,
[](units::precise_unit* unit,
double value,
const char* convert_to_units) {
return units::convert(
value,
*unit,
units::unit_from_string(std::string(convert_to_units)));
},
"value"_a,
"unit_out"_a,
"value represented by one unit in terms of another")
"value represented by one unit in terms of another")
.def(
"is_default",
&units::precise_unit::is_default,
Expand Down

0 comments on commit 24cffe0

Please sign in to comment.