Skip to content

Commit 3519cdf

Browse files
committed
Make the message display more user friendly
1 parent 29978ca commit 3519cdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numpy_financial/_financial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,9 @@ def irr(values, guess=None, tol=1e-12, maxiter=100):
753753
# we don't perform any further calculations and exit early
754754
same_sign = np.all(values > 0) if values[0] > 0 else np.all(values < 0)
755755
if same_sign:
756-
print('No solution exists for IRR since all'
757-
'cashflows are of the same sign. Returning'
758-
'np.nan')
756+
print('\nNo solution exists for IRR since all '
757+
'cashflows are of the same sign. Returning '
758+
'np.nan\n')
759759
return np.nan
760760

761761
# If no value is passed for `guess`, then make a heuristic estimate

0 commit comments

Comments
 (0)