Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
fd632d113f
commit
93ad463b9c
1 changed files with 7 additions and 2 deletions
|
@ -140,9 +140,14 @@ a and b are not independent. If I change b this changes automatically a too. **I
|
||||||
Operations which are known to create views are:
|
Operations which are known to create views are:
|
||||||
* Slicing
|
* Slicing
|
||||||
* Reshaping
|
* Reshaping
|
||||||
* ndarray.view()
|
* Transposition (e.g. b=a.T)
|
||||||
* Transposition
|
* [ndarray.view()](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html)
|
||||||
|
|
||||||
|
```python
|
||||||
|
ndarray.view([dtype][, type])
|
||||||
|
```
|
||||||
|
|
||||||
|
> New view of array with the same data
|
||||||
|
|
||||||
* Using [start:stop:step] for slicing out segments results in a view. b = a[:-1]
|
* Using [start:stop:step] for slicing out segments results in a view. b = a[:-1]
|
||||||
* A simple assignment keeps a view as a view. e.g. b = a
|
* A simple assignment keeps a view as a view. e.g. b = a
|
||||||
|
|
Loading…
Reference in a new issue