'Regression test for https://github.com/astropy/astropy/issues/4600
and https://github.com/astropy/astropy/issues/4588
Identical to test_scale_bzero_with_int_data() but uses a compressed
image.'

def test_scale_bzero_with_compressed_int_data(self):

    a = np.arange(100, 200, dtype=np.int16)
    hdu1 = fits.CompImageHDU(data=a.copy())
    hdu2 = fits.CompImageHDU(data=a.copy())
    hdu1.scale('int16', bzero=99.0)
    hdu2.scale('int16', bzero=99)
    assert np.allclose(hdu1.data, hdu2.data)
