Commit 768ffa71 authored by Médéric Boquien's avatar Médéric Boquien

Set the comparison constant to the right type to avoid a useless conversion.

parent 021e2d75
......@@ -300,7 +300,7 @@ class Observation(object):
else:
if self.redshift == 0.:
self.distance = 10. * parsec
elif self.redshift > 0:
elif self.redshift > 0.:
self.distance = cosmo.luminosity_distance(self.redshift).value
else:
self.distance = np.nan
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment