Hello and welcome to this tutorial from this tutorial, we understand.
No indexing and selection.
Let us begin with the basics.
First, we have to import the library import numpty as and.
Now create an ad A and B dot at age 10, Comac 21.
Take the elements in this array, numbers from 10 to 20.
Let us understand, indexing first typed the name of Eddie here V how to select No.15.
Let us take the index location zero one, two, three, four, five.
You for you.
Fifteen.
No, we will select the numbers from 10 to 14 by the name of Eddie Index zero two for you.
Great numbers, strong, 10 to 14, upper bound is excluded here.
Zero, one, two, three, four.
We have specified indexed for you as a part bound.
That is 415 and it is excluded.
Now, suppose we have to select all the elements from this number.
Well, to do that, we have to specify from index to then call execute all the numbers from Towill up
to end.
Now, suppose we have to select all the numbers of 215 to do that type name of the Eddie Colon Index,
location six.
All the numbers up 215.
So this is all about the indexing and selection in array.
Let us understand about the broadcasting values.
Take the elements in Eddie.
No broadcast to do that type edit name.
Indexes from zero to for you is equal, 200 executed.
Now take the eddy.
You can see here foot five elements are a hundred.
So using the broadcasting, we can change the elements in an array.
No, really find this at a.
ENPI Dot Huddinge.
David Guama, 21.
Take this, Eddie.
Great.
Now, take this slice of this, Eddie, elements from index zero to six.
Save this in a variable.
At Eddie.
Staple here.
Great.
Now, take this variable.
Numbers from 10 to 15.
No use broadcasting on this variable.
Slice at a.
All the elements is equal to ninety nine.
Take this variable.
All the elements are 99.
No joke or regional.
Eddie.
Here to let us understand this first, we have defined an eddy.
This one, a R ah.
These are the elements in this eddy from number 10 to 20.
Then we have taken a sleighs that is from index zero to six and we help broadcaster this variable slice
and dice score a R with 99.
So all the elements in this variable are replaced.
But when we replace all the elements in a sleigh's, the ordinal eddy is also changed.
That means data is not copied in this variable.
It is just a view of original at a number.
Does that to our memory issues.
We can make a copy.
Also, let us see how you define a variable.
Edit underscore copy is equal to or regional at a dot.
Copy.
Now, take this at a.
Same as orignal at a.
No broadcast this, Eddie.
Name of the Eddie.
All the elements in the 200.
Now, take this at eight.
We have to take this.
Eddie.
All the elements are handed.
No.
Now, take the copy.
All the elements are the same as previous one.
So there is no effect on this copy.
Let us see one more example.
Redefine this at a ENP dot.
Arrange.
Zero karma.
Live on.
Numbers from zero to 10.
Now take a slice.
Eddie.
Indexed location zero to five to.
Jake, this displays.
Great.
Zero, one, two, three, four, no broadcast.
Select all the elements.
No, all the elements are 100.
Take additional, Eddie.
First, few elements are changed.
Now make a copy.
At HCB to name off the air a copy.
No broadcast.
All the elements.
200.
Take this, Eddie.
All the elements are 200.
No, no Jake or regional Eddie.
Same.
No change.
Let us understand this again, when we take a slice of an eddy like this, then it is just a view of
regional eddy.
Whatever changes we will do in this eddy will be reflected in orignal eddy.
To a word that we can do this.
We can take a copy of this Eddy.
So this tutorial NCR, let us revise what we have learned in this tutorial here.
We are understanding, indexing and selection in numpty.
It is very similar to the lists.
Then Vho understood broadcasting devalued to broadcast, devalued velho to light.
Name of the A then type the index locations and specify a number.
And at the end, V.L. understood how to use Kopi.
The copy mattered.
So despite ended Odille NCA.
I will see you in the next one.
buildOn Happy learning.