Skip to content

Commit 2c5d46c

Browse files
committed
Comments
1 parent 6bf078b commit 2c5d46c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

linear_systems.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def backward_substitution(upper, d):
2525

2626
for i in range(n - 1, -1, -1):
2727
if upper[i, i] == 0:
28-
raise ValueError("Matrix 'upper' is singular.")
28+
raise ValueError("'upper' is a singular matrix.")
2929

3030
x[i] = b[i] / upper[i, i]
3131
b[0:i] = b[0:i] - upper[0:i, i] * x[i]
@@ -53,7 +53,7 @@ def forward_substitution(lower, c):
5353

5454
for i in range(0, n):
5555
if lower[i, i] == 0:
56-
raise ValueError("Matrix 'lower' is singular.")
56+
raise ValueError("'lower' is a singular matrix.")
5757

5858
x[i] = b[i] / lower[i, i]
5959
b[i + 1:n] = b[i + 1:n] - lower[i + 1:n, i] * x[i]

polynomials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def root_limits(c):
8888
c = np.concatenate((c, [0]))
8989

9090
if c[1] == 0:
91-
raise ValueError("The coefficient c[1] is null.")
91+
raise ValueError("The first coefficient is null.")
9292

9393
t = n + 1
9494
c[t + 1] = 0

0 commit comments

Comments
 (0)