We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00c1290 commit 5b5ccd2Copy full SHA for 5b5ccd2
causalpy/utils.py
@@ -67,8 +67,8 @@ def _format_sig_figs(value, default=None):
67
return max(int(np.log10(np.abs(value))) + 1, default)
68
69
70
-def convert_to_string(x: Union[float, xr.DataArray], round_to=2) -> str:
71
- """Utility function which takes in nunmeric inputs and returns a string."""
+def convert_to_string(x: Union[float, xr.DataArray], round_to: int = 2) -> str:
+ """Utility function which takes in numeric inputs and returns a string."""
72
if isinstance(x, float):
73
# In the case of a float, we return the number rounded to 2 decimal places
74
return f"{x:.2f}"
0 commit comments