simplified assert
@@ -126,7 +126,7 @@ def test_fake(sky_model, geom, geom_etrue):
"""Test the fake dataset"""
dataset = get_map_dataset(sky_model, geom, geom_etrue)
npred = dataset.npred()
- assert len(np.where(npred.data < 0)[0]) == 0 # npred must be positive
+ assert np.all(npred.data >= 0) # npred must be positive
dataset.counts = npred
real_dataset = dataset.copy()
dataset.fake(314)
