commit
814170d1e2
@ -69,7 +69,7 @@ np.nan in set([np.nan])
|
||||
#### 24. Multiply a 5x3 matrix by a 3x2 matrix (real matrix product) (★☆☆)
|
||||
`hint:`
|
||||
#### 25. Given a 1D array, negate all elements which are between 3 and 8, in place. (★☆☆)
|
||||
`hint: >, <=`
|
||||
`hint: >, <`
|
||||
#### 26. What is the output of the following script? (★☆☆)
|
||||
```python
|
||||
# Author: Jake VanderPlas
|
||||
|
@ -205,7 +205,7 @@ Z = np.ones((5,3)) @ np.ones((3,2))
|
||||
print(Z)
|
||||
```
|
||||
#### 25. Given a 1D array, negate all elements which are between 3 and 8, in place. (★☆☆)
|
||||
`hint: >, <=`
|
||||
`hint: >, <`
|
||||
|
||||
```python
|
||||
# Author: Evgeni Burovski
|
||||
|
@ -211,7 +211,7 @@ print(Z)
|
||||
# Author: Evgeni Burovski
|
||||
|
||||
Z = np.arange(11)
|
||||
Z[(3 < Z) & (Z <= 8)] *= -1
|
||||
Z[(3 < Z) & (Z < 8)] *= -1
|
||||
print(Z)
|
||||
```
|
||||
#### 26. What is the output of the following script? (★☆☆)
|
||||
|
@ -266,7 +266,7 @@ print(Z)
|
||||
Given a 1D array, negate all elements which are between 3 and 8, in place. (★☆☆)
|
||||
|
||||
< h25
|
||||
hint: >, <=
|
||||
hint: >, <
|
||||
|
||||
< a25
|
||||
# Author: Evgeni Burovski
|
||||
|
Loading…
Reference in New Issue
Block a user