Commit cce097cb authored by Gemma Guest's avatar Gemma Guest
Browse files

Always cast FWHM setter to double

Previously we supported passing lists of ints but they will be cast to
double eventually anyway
parent 0e77fd6a
......@@ -499,7 +499,7 @@ class CrystalField(object):
if self.PhysicalProperty is not None and len(value) == len(self.Temperature) - len(self.PhysicalProperty):
value = value + [0] * len(self.PhysicalProperty)
# Cast all types to match the first elem so we don't have mixed lists of int/doubles
value = [type(value[0])(v) for v in value]
value = [float(v) for v in value]
raise RuntimeError('Vector of FWHMs must either have same size as '
'Temperatures (%i) or have size 1.' % (len(self.Temperature)))
Supports Markdown
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