Repository navigation
Commit a7f6e28
committed
fix(matrix): raise TypeError for non-matrix input in multiply
multiply() only assigned rows and cols inside an if that had no else, so
multiply([3], [4, 5]) crashed with UnboundLocalError. Raise the same
TypeError("Expected a matrix, got int/list instead") that add, subtract
and transpose already raise for invalid input.1 parent 6e03a48 commit a7f6e28
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments