Browse Source

Numpy

pull/10/head
Jure Šorn 5 years ago
parent
commit
418d6d2a3d
1 changed files with 6 additions and 6 deletions
  1. 12
      README.md

12
README.md

@ -1676,16 +1676,16 @@ import numpy as np
<array> = np.random.randint(from_inclusive, to_exclusive, <shape>)
```
```python
first_column = <array>[:, 0] # Or: <array>[..., 0]
value = <array>.min([axis])
index = <array>.argmin([axis])
```
```python
<array>.shape = <shape>
<view> = <array>.reshape(<shape>)
<view> = np.broadcast_to(<array>, <shape>)
```
```python
<el_or_array> = <array>[:,0] # First column.
<el_or_array> = <array>.sum([<axix>]) # Axis is an index of dimension that gets collapsed.
<el_or_array> = <array>.argmin([<axis>]) # Returns index/es of smallest elements.
<el_or_array> = <array>[filter_expression]
```

Loading…
Cancel
Save