mention np.errstate
context manager in exercise 31.
This commit is contained in:
parent
e8ad2e1123
commit
4cb1d8cd76
@ -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? (★☆☆)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user