Skip to content

Commit af0464f

Browse files
committed
Decorator
1 parent cef1cea commit af0464f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ def function_that_gets_passed_to_decorator():
608608
```
609609

610610
### Debugger Example
611-
**"Wraps" decorator copies metadata of function func() to function out(). Without it `add.__name__` would return `'out'`.**
611+
**Prints functions name every time it gets called. Wraps is a helper decorator that copies metadata of function func() to function out(). Without it `'add.__name__'` would return `'out'`.**
612612

613613
```python
614614
from functools import wraps
@@ -1730,6 +1730,7 @@ import numpy as np
17301730

17311731
#### Integer array indexing:
17321732
**If row and column indexes differ in shape, they are combined with broadcasting.**
1733+
17331734
```bash
17341735
<1d_array> = <2d_array>[<1d_row_indexes>, <1d_column_indexes>]
17351736
<2d_array> = <2d_array>[<2d_row_indexes>, <2d_column_indexes>]
@@ -1743,6 +1744,7 @@ import numpy as np
17431744

17441745
### Broadcasting
17451746
**Broadcasting is a set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions.**
1747+
17461748
```python
17471749
left = [[0.1], [0.6], [0.8]] # Shape: (3, 1)
17481750
right = [ 0.1 , 0.6 , 0.8 ] # Shape: (3)

0 commit comments

Comments
 (0)