Numpy Array Copy Vs View - Numpy For Machine Learning 4

Опубликовано: 10 Февраль 2025
на канале: Codemy.com
16,941
535

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