Skip to content

Commit 08d4b58

Browse files
committed
NumPy
1 parent 0ab7e6a commit 08d4b58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,8 @@ NumPy
14641464
```
14651465

14661466
```python
1467-
value = <array>.min([axis])
1468-
index = <array>.argmin([axis])
1467+
value = <array>.min([axis])
1468+
index = <array>.argmin([axis])
14691469
```
14701470

14711471
```python
@@ -1480,17 +1480,17 @@ index = <array>.argmin([axis])
14801480
left = [[0.1], [0.6], [0.8]] # Shape: (3, 1)
14811481
right = [ 0.1 , 0.6 , 0.8 ] # Shape: (3)
14821482
```
1483-
1. If array shapes differ, left-pad the smaller shape with ones.
1483+
**1. If array shapes differ, left-pad the smaller shape with ones.**
14841484
```python
14851485
left = [[0.1], [0.6], [0.8]] # Shape: (3, 1)
14861486
right = [[0.1 , 0.6 , 0.8]] # Shape: (1, 3) <- !
14871487
```
1488-
2. If any dimensions differ in size, expand the ones that have size 1 by duplicating their elements.
1488+
**2. If any dimensions differ in size, expand the ones that have size 1 by duplicating their elements.**
14891489
```python
14901490
left = [[0.1, 0.1, 0.1], [0.6, 0.6, 0.6], [0.8, 0.8, 0.8]] # Shape: (3, 3) <- !
14911491
right = [[0.1, 0.6, 0.8], [0.1, 0.6, 0.8], [0.1, 0.6, 0.8]] # Shape: (3, 3) <- !
14921492
```
1493-
3. If neither non-matching dimension has size 1, rise an error.
1493+
**3. If neither non-matching dimension has size 1, rise an error.**
14941494

14951495
### Example
14961496
**For each point returns index of its nearest point: `[0.1, 0.6, 0.8] => [1, 2, 1]`.**

0 commit comments

Comments
 (0)