solutions update from a4bf63e
This commit is contained in:
committed by
github-actions[bot]
parent
a4bf63e6bc
commit
e865a958ed
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user