You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---------------------------------------------------------------------------ValueErrorTraceback (mostrecentcalllast)
File~/miniconda3/envs/roman2/lib/python3.11/site-packages/astropy/units/quantity.py:1535, inQuantity.__format__(self, format_spec)
1534try:
->1535returnself.to_string(format=format_spec)
1536exceptValueError:
1537# We might have a unit format not implemented in `to_string()`.File~/miniconda3/envs/roman2/lib/python3.11/site-packages/astropy/units/quantity.py:1451, inQuantity.to_string(self, unit, precision, format, subfmt)
1450ifformatnotinformats:
->1451raiseValueError(f"Unknown format '{format}'")
1452elifformatisNone:
ValueError: Unknownformat'.5'Duringhandlingoftheaboveexception, anotherexceptionoccurred:
TypeErrorTraceback (mostrecentcalllast)
CellIn[10], line1---->1print(s3d)
File~/miniconda3/envs/roman2/lib/python3.11/site-packages/specutils/spectra/spectrum1d.py:750, inSpectrum1D.__str__(self)
748fori, fluxinenumerate(self.flux):
749label='flux{:2}'.format(i)
-->750result+=self._format_array_summary(label, flux) +'\n'751else:
752result+=self._format_array_summary('flux', self.flux) +'\n'File~/miniconda3/envs/roman2/lib/python3.11/site-packages/specutils/spectra/spectrum1d.py:734, inSpectrum1D._format_array_summary(self, label, array)
732mean=np.mean(array)
733s="{:17} [ {:.5}, ..., {:.5} ], mean={:.5}"-->734returns.format(label+':', array[0], array[-1], mean)
735else:
736return"{:17} [ ], mean= n/a".format(label+':')
File~/miniconda3/envs/roman2/lib/python3.11/site-packages/astropy/units/quantity.py:1545, inQuantity.__format__(self, format_spec)
1543# Can the value be formatted on its own?1544try:
->1545returnf"{format(self.value, format_spec)}{self._unitstr:s}"1546exceptValueError:
1547# Format the whole thing as a single string.1548returnformat(f"{self.value}{self._unitstr:s}", format_spec)
TypeError: unsupportedformatstringpassedtonumpy.ndarray.__format__
Using specutils v1.11.0, py 3.9.12, platform: osx-arm64.
The text was updated successfully, but these errors were encountered:
If I make a
Spectrum1D
and print it with:I get the following traceback:
Using specutils v1.11.0, py 3.9.12, platform: osx-arm64.
The text was updated successfully, but these errors were encountered: