Skip to content

Commit

Permalink
string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Nov 25, 2024
1 parent 587c33a commit 817a054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coordinax/_src/vectors/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def check_non_negative(x: AbstractQuantity, /, name: str = "") -> AbstractQuanti
"""
name = f" {name}" if name else name
return eqx.error_if(x, xp.any(x < 0), "The input{name} must be non-negative.")
return eqx.error_if(x, xp.any(x < 0), f"The input{name} must be non-negative.")


def check_non_negative_non_zero(
Expand Down Expand Up @@ -132,7 +132,7 @@ def check_non_negative_non_zero(
"""
name = f" {name}" if name else name
return eqx.error_if(
x, xp.any(x <= 0), "The input{name} must be non-negative and non-zero."
x, xp.any(x <= 0), f"The input{name} must be non-negative and non-zero."
)


Expand Down

0 comments on commit 817a054

Please sign in to comment.