Skip to content

Commit

Permalink
typing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsantana11 committed Oct 20, 2024
1 parent 8b52d59 commit 012981b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions clouddrift/adapters/ibtracs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import tempfile
from typing import Literal, TypeAlias
from typing import Hashable, Literal, TypeAlias

import numpy as np
import xarray as xr
Expand Down Expand Up @@ -90,11 +90,12 @@ def to_raggedarray(
ds = xr.open_dataset(dst_path, engine="netcdf4")
ds = ds.rename_dims({"date_time": "obs"})

vars = list()
vars.extend(ds.variables)
vars -= ds.coords.keys()
vars = list[Hashable]()
vars.extend(ds.variables.keys())
for coord in ds.coords.keys():
vars.remove(coord)
dtypes = {v: ds[v].dtype for v in vars}
dtypes.update({"numobs": np.int64})
dtypes.update({"numobs": np.dtype("int64")})
ds = ds.astype(dtypes)

data_vars = list()
Expand Down

0 comments on commit 012981b

Please sign in to comment.