From 6277bf2ecc8b52e1d21af1a37a797145487da86e Mon Sep 17 00:00:00 2001
From: Moritz Huebner <email@moritz-huebner.de>
Date: Tue, 22 May 2018 21:19:38 +1000
Subject: [PATCH] Moritz Huebner: Added call to super class

---
 tupak/prior.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tupak/prior.py b/tupak/prior.py
index eb2d39f09..5918780ea 100644
--- a/tupak/prior.py
+++ b/tupak/prior.py
@@ -297,10 +297,9 @@ class Interped(Prior):
         self.xx = xx
         self.yy = yy
         self.all_interpolated = interp1d(x=xx, y=yy, bounds_error=False, fill_value=0)
-        Prior.__init__(self, name, latex_label)
+        Prior.__init__(self, name, latex_label, minimum=np.nanmax(np.array((min(xx), minimum))),
+                       maximum=np.nanmin(np.array((max(xx), maximum))))
         self.__initialize_attributes()
-        self.minimum = np.nanmax(np.array((min(xx), minimum)))
-        self.maximum = np.nanmin(np.array((max(xx), maximum)))
 
     def prob(self, val):
         """Return the prior probability of val"""
@@ -378,7 +377,7 @@ class FromFile(Interped):
     def __repr__(self):
         prior_name = self.__class__.__name__
         prior_args = ', '.join(
-            ['{}={}'.format(key, self.__dict__[key]) for key in ['id', 'minimum', 'maximum', '_Prior__latex_label']])
+            ['{}={}'.format(key, self.__dict__[key]) for key in ['id', '_Interped__minimum', '_Interped__maximum', '_Prior__latex_label']])
         return "{}({})".format(prior_name, prior_args)
 
 
-- 
GitLab