mention np.errstate context manager in exercise 31.
This commit is contained in:
@@ -288,6 +288,13 @@ Z = np.ones(1)/0
|
|||||||
_ = np.seterr(**defaults)
|
_ = np.seterr(**defaults)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
An equivalent way, with a context manager:
|
||||||
|
|
||||||
|
```python
|
||||||
|
with np.errstate(divide='ignore'):
|
||||||
|
Z = np.ones(1) / 0
|
||||||
|
```
|
||||||
|
|
||||||
#### 32. Is the following expressions true? (★☆☆)
|
#### 32. Is the following expressions true? (★☆☆)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user