Skip to content

Commit 418d6d2

Browse files
committed
Numpy
1 parent 0def444 commit 418d6d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,16 +1676,16 @@ import numpy as np
16761676
<array> = np.random.randint(from_inclusive, to_exclusive, <shape>)
16771677
```
16781678

1679-
```python
1680-
first_column = <array>[:, 0] # Or: <array>[..., 0]
1681-
value = <array>.min([axis])
1682-
index = <array>.argmin([axis])
1683-
```
1684-
16851679
```python
16861680
<array>.shape = <shape>
16871681
<view> = <array>.reshape(<shape>)
16881682
<view> = np.broadcast_to(<array>, <shape>)
1683+
```
1684+
1685+
```python
1686+
<el_or_array> = <array>[:,0] # First column.
1687+
<el_or_array> = <array>.sum([<axix>]) # Axis is an index of dimension that gets collapsed.
1688+
<el_or_array> = <array>.argmin([<axis>]) # Returns index/es of smallest elements.
16891689
<el_or_array> = <array>[filter_expression]
16901690
```
16911691

0 commit comments

Comments
 (0)