Commit dc852ec
authored
Minor correction to nqueens.py
Preparing to use this for a demo, I noticed a minor inconsistency.
The `axis` kwarg specifies the axis over which to sum, with 0 being rows and 1 being columns. But to get row totals you have to sum over columns, and vice versa.
Although the symmetry in this problem means it makes no difference, I thought it'd be better to avoid confusion.1 parent 54b3012 commit dc852ec
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
0 commit comments