Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-14 18:27:32 +01:00 committed by GitHub
parent 5ff6611020
commit 9d3d36c23d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,6 +173,17 @@ A combination of indexing and slicing can be done but requires some thought. Oth
```python
import numpy as np
a = np.arange(1, 28).reshape(3, 3, 3)
idx = [[1, 1], [1, 1]]
print(a[:, idx, :].shape) # -> (3, 2, 2, 3)
```
You want another example?
```python
import numpy as np
a = np.empty((10, 20, 30, 40, 50))