#30 Python Tutorial for Beginners | Copying an Array in Python

Published: 23 July 2018
on channel: Telusko
482,632
9.1k

Check out our courses:

Spring Framework in 8 Full Day Course Live: https://go.telusko.com/SPRING8DAYS2
Coupon: TELUSKO10 (10% Discount)

Complete Java Developer Course Batch-3: https://go.telusko.com/completebatch3
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

Spring: https://go.telusko.com/udemyteluskosp...
Java:- https://go.telusko.com/udemyteluskojava
Java Spring:- https://go.telusko.com/Udemyjavaspring
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord :   / discord  

In this lecture we will see:
Addition of values in an array
Different functions that can be performed on arrays
What is Aliasing in python?
Different ways of copying an array


#1
We can add any value in each element of an array.
We can also add values of two arrays.
The addition of two arrays is known as Vectorized Operation.
We can also find the values of each element of an array of mathematical operations such as sin, cos, tan, log, sqrt etc.
Sum of every element of an array can also be calculated by using the sum() function.
Minimum value can also be get from an array through the min() function.
Maximum value can be get from an array by using the max() function.
Unique elements from an array and the sorted array can also be get.
Concatenation of two arrays can also be performed by using the concatenate function. This function combines two arrays.

#2
Two variables can be pointed towards a single array. It means both variables are pointing to the same memory address where the array is stored.
In Python, Aliasing happens whenever one variable's value is assigned to another variable.
view() is a function that helps to create a new array at a new location. It means arrays should be present at the different memory addresses.
By using the view() functions, two variables will point towards two different arrays.

#3
In python, two copying techniques are available i.e.,
1. Shallow Copy
2. Deep Copy
In shallow copy, it will copy elements but it means both arrays are dependent on each other.
In shallow copy, if we update an element in one array then the changes would also be reflected in another array.
In a deep copy, two different arrays are not linked with each other in any way.
In a deep copy, we use the function known as a copy() instead of using the view() function.
copy() function provides a deep copy of an array.

Github :- https://github.com/navinreddy20/Python-

Python for Beginners :- http://bit.ly/3JOLQhl

Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D

Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN

Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmk...
Telusko Hindi :
https://www.youtube.com/channel/UCitz...


Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
http://www.telusko.com/contactus


Watch video #30 Python Tutorial for Beginners | Copying an Array in Python online without registration, duration hours minute second in high quality. This video was added by user Telusko 23 July 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 482,63 once and liked it 9.1 thousand people.