Skip to content

Commit

Permalink
fix edge-case where there are no values in index
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbranson committed Nov 7, 2024
1 parent 48bc69d commit 53db6a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cbsyst/cbsyst.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def Csys(
for p in ["DIC", "CO2", "HCO3", "CO3", "BT", "fCO2", "pCO2", "PT", "SiT"]:
if ps[p] is not None:
if isinstance(ps[p], (np.ndarray, pd.core.series.Series)):
ps[p][ps[p] < 0] = np.nan
if any(ps[p] < 0):
ps[p][ps[p] < 0] = np.nan
elif ps[p] < 0:
ps[p] = np.nan

Expand Down

0 comments on commit 53db6a5

Please sign in to comment.