Skip to content

Commit 9185a5d

Browse files
committed
Get rid of pandas
Since it should be an optional dependency anyway
1 parent 8d054cb commit 9185a5d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pysteps/blending/utils.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from pathlib import Path
2222

2323
import numpy as np
24-
import pandas as pd
2524
import netCDF4
2625

2726
from pysteps.cascade import get_method as cascade_get_method
@@ -303,9 +302,7 @@ def decompose_NWP(
303302
"""
304303

305304
# Make a NetCDF file
306-
output_date = datetime.datetime.strftime(
307-
pd.to_datetime(analysis_time), "%Y%m%d%H%M%S"
308-
)
305+
output_date = f"{analysis_time.astype(datetime.datetime):%Y%m%d%H%M%S}"
309306
outfn = Path(output_path) / f"cascade_{NWP_model}_{output_date}.nc"
310307
ncf = netCDF4.Dataset(outfn, "w", format="NETCDF4")
311308

@@ -401,9 +398,7 @@ def compute_store_nwp_motion(
401398
"""
402399

403400
# Set the output file
404-
output_date = datetime.datetime.strftime(
405-
pd.to_datetime(analysis_time), "%Y%m%d%H%M%S"
406-
)
401+
output_date = f"{analysis_time.astype(datetime.datetime):%Y%m%d%H%M%S}"
407402
outfn = Path(output_path) / f"motion_{nwp_model}_{output_date}.npy"
408403

409404
# Get the velocity field per time step

0 commit comments

Comments
 (0)