Commit dc9d5e8
authored
Add clarifying comments for code review feedback
- Document that const cast to (char*) is safe because PyBUF_READ makes view read-only
- Add detailed comment explaining PyErr_Occurred() check is necessary and correct
- NpyIter can return 0 for TWO reasons: end of iteration OR error
- Checking PyErr_Occurred() after loop is the standard NumPy iterator pattern1 parent b181e3a commit dc9d5e8
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1269 | 1269 | | |
1270 | 1270 | | |
1271 | 1271 | | |
1272 | | - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
1273 | 1275 | | |
1274 | 1276 | | |
1275 | 1277 | | |
| |||
1300 | 1302 | | |
1301 | 1303 | | |
1302 | 1304 | | |
1303 | | - | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1304 | 1309 | | |
1305 | 1310 | | |
1306 | 1311 | | |
| |||
0 commit comments