Commit e6276945 authored by Gregory Ashton's avatar Gregory Ashton

Move default args into a property to avoid calling at init

parent 26822050
......@@ -17,12 +17,14 @@ except ImportError:
class Cosmological(Interped):
_default_args_dict = dict(
redshift=dict(name='redshift', latex_label='$z$', unit=None),
luminosity_distance=dict(
name='luminosity_distance', latex_label='$d_L$', unit='Mpc'),
comoving_distance=dict(
name='comoving_distance', latex_label='$d_C$', unit='Mpc'))
@property
def _default_args_dict(self):
return dict(
redshift=dict(name='redshift', latex_label='$z$', unit=None),
luminosity_distance=dict(
name='luminosity_distance', latex_label='$d_L$', unit=units.Mpc),
comoving_distance=dict(
name='comoving_distance', latex_label='$d_C$', unit=units.Mpc))
def __init__(self, minimum, maximum, cosmology=None, name=None,
latex_label=None, unit=None):
......
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