Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions repyability/rbd/_point_availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,7 @@ def __init__(
def at(self, x: np.ndarray) -> np.ndarray:
if self.times is None:
return np.ones(np.shape(x))
assert self.up is not None # set with times
return np.interp(x, self.times, self.up)

def knots(self, start: float, stop: float) -> np.ndarray:
Expand Down Expand Up @@ -2042,6 +2043,7 @@ def events(self, x: np.ndarray) -> Dict[str, np.ndarray]:
x = np.asarray(x, dtype=float)
if self.times is None:
return _events(cumulative_hazard(self.life, x))
assert self.failures is not None # set with times
return _events(np.interp(x, self.times, self.failures))

def atoms(self, stop: float) -> Atoms:
Expand Down
Loading