Skip to content

Commit 464a826

Browse files
committed
update for astropy changes
1 parent 6671b01 commit 464a826

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

specutils/tests/test_loaders.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def test_tabular_fits_cov_io(tmp_path):
595595
np.full(1000-1, 0.5, dtype=float),
596596
np.full(1000-2, 0.2, dtype=float),
597597
]
598-
cov = Covariance(sparse.diags(cov_diags, [0, 1, 2]), unit=u.Jy**2)
598+
cov = Covariance(array=sparse.diags(cov_diags, [0, 1, 2]), unit=u.Jy**2)
599599

600600
# Create the Spectrum1D
601601
spectrum = Spectrum1D(flux=flux, spectral_axis=wave, uncertainty=cov)
@@ -613,7 +613,8 @@ def test_tabular_fits_cov_io(tmp_path):
613613
'Extension names are wrong'
614614
assert all([h.__class__.__name__ == 'BinTableHDU' for h in hdu[1:]]), \
615615
'Data extensions should both be BinTableHDU'
616-
assert len(hdu['CORREL'].data) == cov.nnz, 'Number of non-zero cov elements mismatch'
616+
assert len(hdu['CORREL'].data) == cov.stored_nnz, \
617+
'Number of non-zero cov elements mismatch'
617618

618619
# Read it
619620
_spectrum = Spectrum1D.read(tmpfile)

0 commit comments

Comments
 (0)