Skip to content

Commit

Permalink
remove unit
Browse files Browse the repository at this point in the history
  • Loading branch information
yymao committed Jan 12, 2024
1 parent f45c6f8 commit dca0a00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SAGA/spectra/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def ensure_specs_dtype(spectra, cols_definition=_SPECS_COLUMNS, skip_missing_col
raise ValueError("unknown spec type!")
else:
cols.append(c)
if hasattr(spectra[c], "unit") and hasattr(spectra[c], "value"):
spectra.replace_column(c, spectra[c].value)
if spectra[c].dtype.str != t:
spectra.replace_column(c, spectra[c].astype(t))
if spectra[c].description:
Expand Down

0 comments on commit dca0a00

Please sign in to comment.