[Scipy-svn] r2256 - trunk/Lib/sandbox/models

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Oct 12 01:50:52 CDT 2006


Author: timl
Date: 2006-10-12 01:50:41 -0500 (Thu, 12 Oct 2006)
New Revision: 2256

Modified:
   trunk/Lib/sandbox/models/survival.py
Log:
rearrange the SurvivalTime class hierarchy

Modified: trunk/Lib/sandbox/models/survival.py
===================================================================
--- trunk/Lib/sandbox/models/survival.py	2006-10-12 06:48:34 UTC (rev 2255)
+++ trunk/Lib/sandbox/models/survival.py	2006-10-12 06:50:41 UTC (rev 2256)
@@ -1,17 +1,18 @@
 import numpy as N
 
 class SurvivalTime:
-    pass
-
-class RightCensored(SurvivalTime):
-
     def __init__(self, time, delta):
         self.time, self.delta = time, delta
 
     def atrisk(self, time):
+        raise NotImplementedError
+
+class RightCensored(SurvivalTime):
+
+    def atrisk(self, time):
         return N.less_equal.outer(time, self.time)
 
-class LeftCensored(RightCensored):
+class LeftCensored(SurvivalTime):
 
     def atrisk(self, time):
         return N.greater_equal.outer(time, self.time)



More information about the Scipy-svn mailing list