solutions update from a4bf63e

This commit is contained in:
rougier
2026-02-09 17:44:51 +00:00
committed by github-actions[bot]
parent a4bf63e6bc
commit e865a958ed
4 changed files with 219 additions and 209 deletions

View File

@@ -130,6 +130,11 @@ print(Z)
Z = np.ones((5,5))
Z = np.pad(Z, pad_width=1, mode='constant', constant_values=0)
print(Z)
# Not a solution to this problem but good to know: using fancy indexing for in-place edit
Z[:, [0, -1]] = 0
Z[[0, -1], :] = 0
print(Z)
```
#### 17. What is the result of the following expression? (★☆☆)
```python