Skip to content

Commit

Permalink
This seems inelegant but does fix the failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed May 24, 2024
1 parent fd720e9 commit 8086104
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specutils/analysis/moment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np
from ..manipulation import extract_region
from ..spectra import SpectralAxis
from ..spectra import SpectrumCollection
from .utils import computation_wrapper


Expand Down Expand Up @@ -40,6 +40,9 @@ def moment(spectrum, regions=None, order=0, axis=-1):
Moment of the spectrum. Returns None if (order < 0 or None)
"""
if isinstance(spectrum, SpectrumCollection):
return [computation_wrapper(_compute_moment, spec, regions,order=order, axis=axis)
for spec in spectrum]
return computation_wrapper(_compute_moment, spectrum, regions,
order=order, axis=axis)

Expand Down

0 comments on commit 8086104

Please sign in to comment.