Skip to content

Commit 0cd7697

Browse files
committed
update for astropy changes
1 parent a3ea93f commit 0cd7697

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
@@ -610,7 +610,7 @@ def test_tabular_fits_cov_io(tmp_path):
610610
np.full(1000-1, 0.5, dtype=float),
611611
np.full(1000-2, 0.2, dtype=float),
612612
]
613-
cov = Covariance(sparse.diags(cov_diags, [0, 1, 2]), unit=u.Jy**2)
613+
cov = Covariance(array=sparse.diags(cov_diags, [0, 1, 2]), unit=u.Jy**2)
614614

615615
# Create the Spectrum1D
616616
spectrum = Spectrum1D(flux=flux, spectral_axis=wave, uncertainty=cov)
@@ -628,7 +628,8 @@ def test_tabular_fits_cov_io(tmp_path):
628628
'Extension names are wrong'
629629
assert all([h.__class__.__name__ == 'BinTableHDU' for h in hdu[1:]]), \
630630
'Data extensions should both be BinTableHDU'
631-
assert len(hdu['CORREL'].data) == cov.nnz, 'Number of non-zero cov elements mismatch'
631+
assert len(hdu['CORREL'].data) == cov.stored_nnz, \
632+
'Number of non-zero cov elements mismatch'
632633

633634
# Read it
634635
_spectrum = Spectrum1D.read(tmpfile)

0 commit comments

Comments
 (0)