Skip to content

Commit

Permalink
combined two checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kthyng committed Aug 28, 2023
1 parent 9582b8d commit 54daec9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions oceans/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,8 @@ def pl33tn(x, dt=1.0, T=33.0, mode="valid", t=None):
import pandas as pd
import xarray as xr

if isinstance(x, xr.Dataset):
raise TypeError("Input a DataArray not a Dataset.")
elif isinstance(x, pd.DataFrame):
raise TypeError("Input a Series not a DataFrame.")
if isinstance(x, (xr.Dataset,pd.DataFrame)):
raise TypeError("Input a DataArray not a Dataset, or a Series not a DataFrame.")

if isinstance(x, pd.Series) and not isinstance(
x.index,
Expand Down

0 comments on commit 54daec9

Please sign in to comment.