Numpy Array Copy Vs View - Numpy For Machine Learning 4

preview_player
Показать описание
In this video we'll look at Copy vs. View for Numpy Arrays.

There are a couple of ways to make copies of your Numpy Arrays. You can make a Copy or a View.

A Copy is a totally separate copy, whereas a View is a copy that's still connected to the original.

If you make a change to the original, that change will reflect in the view and if you make a change to the view, that change will reflect in the original.

#numpy #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:00 - Create a Numpy Array
1:13 - Create a Numpy Array View
1:49 - Make a Change To The Original Numpy Array
3:22 - Create a Numpy Array Copy
3:33 - Make a Change To The Original Numpy Array
4:21 - Make a Change To The Numpy Array Copy
5:29 - Conclusion
Рекомендации по теме
Комментарии
Автор

▶ Watch Entire Numpy Playlist ✅ Subscribe To My YouTube Channel:
▶ See More At: ✅ Join My Facebook Group:
▶ Get The Code:

Codemycom
Автор

The view creates another reference to the array. same is achieved by the assignment array_a = array_b
then any change to either array will affect the one since both refer the same data in memory

ShukyPersky
Автор

So, the view( ) creates an array whose elements are always pointing at the elements of the original array??

antareeproy
Автор

This is amazing ! Thank you very much :)

chandraprakash
Автор

how do you type in the italic f inside the print(f'Original NP1 {np1}' ?

emirbahrin
Автор

Simple,
Copy - Call by Value
View - Call by reference

ErenMC_
Автор

What the difference between np2 = np1.view() and np2 = np1?😅

Birb_Is_The_Word
Автор

sir is this playlist really enough for ML ?

AbdallahAnalyst
Автор

hi john, i want some help to build kivy app (i have the app ready)

toufikazmou
Автор

Sir, make a video to upload & retrieve images in database and display images on tkinter GUI window !!!!

jash
Автор

I think it is very confusing to refer to a view as "a copy connected to the original array". It would be better to refer to it as an alias for the the original array.

gedtoon
Автор

that means if np1 is view of np2 then np2 is also of np1

manas