Skip to content

Commit ff5ad1e

Browse files
committed
format changes
1 parent 9796fe3 commit ff5ad1e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

xarray/core/computation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,11 +1958,7 @@ def to_floatable(x: DataArray) -> DataArray:
19581958
else type(x.data[0])(1970, 1, 1)
19591959
)
19601960
return x.copy(
1961-
data=datetime_to_numeric(
1962-
x.data,
1963-
offset=offset,
1964-
datetime_unit="ns"
1965-
),
1961+
data=datetime_to_numeric(x.data, offset=offset, datetime_unit="ns"),
19661962
)
19671963
elif x.dtype.kind == "m":
19681964
# timedeltas

xarray/tests/test_computation.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,13 +2020,18 @@ def test_where_attrs() -> None:
20202020
),
20212021
pytest.param(
20222022
xr.DataArray(
2023-
xr.date_range('1970-01-01', freq='1S', periods=3, use_cftime=True), dims="x"
2023+
xr.date_range("1970-01-01", freq="1S", periods=3, use_cftime=True),
2024+
dims="x",
20242025
),
20252026
xr.DataArray([0, 1], dims="degree", coords={"degree": [0, 1]}),
20262027
xr.DataArray(
20272028
[0, 1e9, 2e9],
20282029
dims="x",
2029-
coords={"x": xr.date_range('1970-01-01', freq='1S', periods=3, use_cftime=True)},
2030+
coords={
2031+
"x": xr.date_range(
2032+
"1970-01-01", freq="1S", periods=3, use_cftime=True
2033+
)
2034+
},
20302035
),
20312036
id="cftime",
20322037
),

0 commit comments

Comments
 (0)