Skip to content

Commit

Permalink
Removed print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethshsu committed May 15, 2024
1 parent e670e61 commit ebdb2dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chainladder/core/triangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,16 +778,16 @@ def trend(
"Only origin and valuation axes are supported for trending"
)

print("====== BEGIN ======")
# print("====== BEGIN ======")
xp = self.get_array_module()

start = pd.to_datetime(start) if type(start) is str else start
start = self.origin[0].to_timestamp() if start is None else start
print("start", start)
# print("start", start)

end = pd.to_datetime(end) if type(end) is str else end
end = self.valuation_date if end is None else end
print("end", end)
# print("end", end)

if axis in ["origin", 2, -2]:
vector = pd.DatetimeIndex(
Expand All @@ -797,7 +797,7 @@ def trend(
)
else:
vector = self.valuation
print("vector\n", vector)
# print("vector\n", vector)

upper, lower = (end, start) if end > start else (start, end)
# print("lower", lower)
Expand All @@ -808,15 +808,15 @@ def trend(
np.minimum(np.datetime64(upper), vector.values), np.datetime64(lower)
)
)
print("vector\n", vector)
# print("vector\n", vector)
# print("vector\n", vector)
# vector = (
# (end.year - vector.year) * 12 + (end.month - vector.month)
# ).values.reshape(self.shape[-2:], order="f")
# print("vector\n", vector)

vector = ((end - vector).days).values.reshape(self.shape[-2:], order="f")
print("days to trend\n", vector)
# print("days to trend\n", vector)

if self.is_ultimate and ultimate_lag is not None and vector.shape[-1] > 1:
vector[:, -1] = vector[:, -2] + ultimate_lag
Expand Down

0 comments on commit ebdb2dc

Please sign in to comment.