add solution with matrix-mult operator

This solution work for Python 3.5 and above.
This commit is contained in:
Joey Freund
2016-09-30 17:25:54 -04:00
committed by GitHub
parent 8db3e71f60
commit 5bd4dca9e2

View File

@@ -208,6 +208,10 @@ color = np.dtype([("r", np.ubyte, 1),
```python
Z = np.dot(np.ones((5,3)), np.ones((3,2)))
print(Z)
# Alternative solution, in Python 3.5 and above
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. (★☆☆)