@@ -1511,7 +1511,7 @@ Line # Hits Time Per Hit % Time Line Contents
1511
1511
```
1512
1512
1513
1513
### Call Graph
1514
- ** Generates a PNG image of call graph with highlighted bottlenecks. **
1514
+ #### Generates a PNG image of call graph with highlighted bottlenecks:
1515
1515
1516
1516
``` python
1517
1517
# $ pip3 install pycallgraph
@@ -1553,28 +1553,28 @@ index = <array>.argmin([axis])
1553
1553
```
1554
1554
1555
1555
### Broadcasting
1556
- ** Broadcasting is a set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions: **
1556
+ ** Broadcasting is a set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions. **
1557
1557
``` python
1558
1558
left = [[0.1 ], [0.6 ], [0.8 ]] # Shape: (3, 1)
1559
1559
right = [ 0.1 , 0.6 , 0.8 ] # Shape: (3)
1560
1560
```
1561
1561
1562
- ** 1. If array shapes differ, left-pad the smaller shape with ones. **
1562
+ #### 1. If array shapes differ, left-pad the smaller shape with ones:
1563
1563
``` python
1564
1564
left = [[0.1 ], [0.6 ], [0.8 ]] # Shape: (3, 1)
1565
1565
right = [[0.1 , 0.6 , 0.8 ]] # Shape: (1, 3) <- !
1566
1566
```
1567
1567
1568
- ** 2. If any dimensions differ in size, expand the ones that have size 1 by duplicating their elements. **
1568
+ #### 2. If any dimensions differ in size, expand the ones that have size 1 by duplicating their elements:
1569
1569
``` python
1570
1570
left = [[0.1 , 0.1 , 0.1 ], [0.6 , 0.6 , 0.6 ], [0.8 , 0.8 , 0.8 ]] # Shape: (3, 3) <- !
1571
1571
right = [[0.1 , 0.6 , 0.8 ], [0.1 , 0.6 , 0.8 ], [0.1 , 0.6 , 0.8 ]] # Shape: (3, 3) <- !
1572
1572
```
1573
1573
1574
- ** 3. If neither non-matching dimension has size 1, rise an error.**
1574
+ #### 3. If neither non-matching dimension has size 1, rise an error.
1575
1575
1576
1576
### Example
1577
- ** For each point returns index of its nearest point: ` [0.1, 0.6, 0.8] => [1, 2, 1] ` . **
1577
+ #### For each point returns index of its nearest point: ` [0.1, 0.6, 0.8] => [1, 2, 1] `
1578
1578
1579
1579
``` python
1580
1580
>> > points = np.array([0.1 , 0.6 , 0.8 ])
0 commit comments