Skip to content

Commit c0d80e0

Browse files
Merge pull request #1419 from jseabold/fix-print
Print with line break
2 parents 6730938 + 4edc615 commit c0d80e0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lifelines/fitters/aalen_additive_fitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def _fit_model_to_data_batch(self, X, T, E, weights, show_progress):
248248
X[exits, :] = 0
249249

250250
if show_progress and i % int((n_deaths / 10)) == 0:
251-
print("\rIteration %d/%d, seconds_since_start = %.2f" % (i + 1, n_deaths, time.time() - start), end="")
251+
print("\rIteration %d/%d, seconds_since_start = %.2f" % (i + 1, n_deaths, time.time() - start))
252252

253253
last_iteration = i + 1
254254
# terminate early when there are less than (3 * d) subjects left, where d does not include the intercept.

lifelines/fitters/cox_time_varying_fitter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,7 @@ def _newton_rhaphson(
434434
if show_progress:
435435
print(
436436
"\rIteration %d: norm_delta = %.5f, step_size = %.5f, ll = %.5f, newton_decrement = %.5f, seconds_since_start = %.1f"
437-
% (i, norm_delta, step_size, ll, newton_decrement, time.time() - start_time),
438-
end="",
439-
)
437+
% (i, norm_delta, step_size, ll, newton_decrement, time.time() - start_time))
440438

441439
# convergence criteria
442440
if norm_delta < precision:

0 commit comments

Comments
 (0)