1 00:00:06,070 --> 00:00:11,330 Hey everyone in the last video we have learned that how we can add them by into program. 2 00:00:11,470 --> 00:00:14,680 Now we are going to focus on some methods of pie. 3 00:00:14,830 --> 00:00:23,680 That is something important one and we will begin with some basic methods that are full creating the 4 00:00:23,730 --> 00:00:24,870 numbers. 5 00:00:25,030 --> 00:00:35,090 So if we have a list that is we take a list exposed as an example that will be a one day list and then 6 00:00:35,090 --> 00:00:36,790 the one that is Phi 7 00:00:39,600 --> 00:00:52,610 that will be a list and here we have one not in this one comma two format three fold comma five comma 8 00:00:52,610 --> 00:01:05,940 six seven combined comma might like to know first if you have to convert this one into N and B at A 9 00:01:06,100 --> 00:01:16,250 then you will do something like and B don't every and pass that particular list. 10 00:01:16,370 --> 00:01:20,680 This will convert that list into a number adding inventory. 11 00:01:20,690 --> 00:01:22,270 They will be same like this one. 12 00:01:22,290 --> 00:01:27,100 And here this one if you print x in command here. 13 00:01:27,230 --> 00:01:35,870 These are just nearly similar but this only get the edit and to convert it to be you will just have 14 00:01:35,870 --> 00:01:38,340 these kind of mattresses. 15 00:01:38,390 --> 00:01:39,730 These are the mattresses. 16 00:01:39,740 --> 00:01:42,290 Those who are not met medical students. 17 00:01:42,290 --> 00:01:43,860 These are known as mattresses. 18 00:01:43,910 --> 00:01:53,020 This thing is known as Death Row these horizontal lines this vertical lines are known as the columns. 19 00:01:53,510 --> 00:01:56,710 So these are something you can imagine. 20 00:01:56,710 --> 00:02:01,910 It's known as a variable in which you can store any data in trees. 21 00:02:02,060 --> 00:02:05,900 And every tree have some particular number of columns. 22 00:02:05,900 --> 00:02:09,870 They may be equal and not backward when the they are equal. 23 00:02:09,870 --> 00:02:13,040 And like here we have three rows and three column. 24 00:02:13,040 --> 00:02:21,340 In that case the mattress is known as a square metrics in which we have rows and columns are equal in 25 00:02:21,340 --> 00:02:26,160 matrices we denote the rows with eye and columns with G. 26 00:02:26,350 --> 00:02:30,640 So when I equal to J it will be a square matrix. 27 00:02:30,850 --> 00:02:37,990 They both combined are known as the overall metrics and denoted by I cross J. 28 00:02:38,120 --> 00:02:46,300 Will the daughter of matrix and with the numbers you can create any kind of metrics like if I need to 29 00:02:46,300 --> 00:02:53,500 create metrics as different types like if all the elements in a matrix are zero then that matrix will 30 00:02:53,500 --> 00:02:59,300 be known as a zero metrics and you can easily create a zero matrix with the by my dick Come on empty 31 00:02:59,300 --> 00:03:09,430 dot zeros and then you will pass the order like if you need one the Eddy just pass like this one here 32 00:03:09,430 --> 00:03:10,930 you have all the elements. 33 00:03:11,380 --> 00:03:19,720 If you need to the Eddie then one thing here to focus whenever you are doing something in PI with more 34 00:03:19,720 --> 00:03:28,720 than one line mention you will always need another bracket so another set of princes inside dependencies 35 00:03:28,760 --> 00:03:35,660 you are working in to declare that particular dimension for every dimension when in segment is if I 36 00:03:35,660 --> 00:03:43,610 need to have 2D then I will use this thing inside dependencies so if generally I am using a tuple because 37 00:03:43,610 --> 00:03:50,810 tuple is defined in Pence's inside Defence is now hit enter we will get this but here we have the order 38 00:03:50,810 --> 00:03:51,730 tree grows too. 39 00:03:52,040 --> 00:03:55,890 So we have three rows and two columns you can have any kind. 40 00:03:55,900 --> 00:03:59,540 Like if I write to equals 20 I get this. 41 00:03:59,820 --> 00:04:05,390 Here they are 20 columns and only three rows. 42 00:04:05,530 --> 00:04:15,400 Also you can have square one like this one you can also perform all patients on that like add five hit 43 00:04:15,400 --> 00:04:22,780 enter an area of all the elements with five will be here if you multiply this one you will get a zero 44 00:04:22,780 --> 00:04:30,040 matrix because zero multiplied by any number will be zero test you can perform any operation also minus 45 00:04:30,040 --> 00:04:37,180 one you will get all the elements negative so that's how you can declare a zero error and convert that 46 00:04:37,180 --> 00:04:41,160 one in any kind of number you want to similar to zero. 47 00:04:41,290 --> 00:04:50,640 We have another metric that is known as unity metrics in which all the elements are equal and that one 48 00:04:50,670 --> 00:05:03,430 is something like we can define like and b not ones but in you new metrics there's one more thing the 49 00:05:03,430 --> 00:05:09,890 elements that are one are only diagonal like this one this thing is known as the diagonal that is the 50 00:05:09,980 --> 00:05:17,300 line joining the corners here this one and this one like this one they both are diagonals and in unity 51 00:05:17,300 --> 00:05:24,940 metrics they are all one in identity metrics all the elements are equal. 52 00:05:25,050 --> 00:05:30,410 So this is a difference between identity and unity I get confused in both of these. 53 00:05:30,450 --> 00:05:37,230 So unity is one in which we have the diagonal elements one and you can define that one like and b not 54 00:05:37,260 --> 00:05:43,860 ones here base first one day you will get this one when I pass there will be 55 00:05:48,100 --> 00:05:56,950 I will get this one sorted that one is bonus metrics and to have identity one this one is for one's 56 00:05:56,950 --> 00:06:08,750 metric identity we have and b it I I command is used for that one here you will get this and this is 57 00:06:08,750 --> 00:06:11,710 the identity unity matrix. 58 00:06:11,720 --> 00:06:13,580 This is the identity matrix. 59 00:06:13,580 --> 00:06:15,960 This one is also the identity matrix. 60 00:06:16,040 --> 00:06:18,370 And this one is also known as divine semantics. 61 00:06:18,380 --> 00:06:19,870 These are a little bit confusing. 62 00:06:19,880 --> 00:06:27,590 Sometimes you get confusing these two like not you but I most of the time get confusing these two. 63 00:06:27,590 --> 00:06:28,190 One more thing. 64 00:06:28,190 --> 00:06:36,770 Here we have pass one the character that is only four but we get up to the very next because all the 65 00:06:36,770 --> 00:06:43,550 metrics is that a square matrix will be only in 2D and for that predict Y only one parameter that's 66 00:06:43,550 --> 00:06:47,200 because in square matrix I equal to Z g. 67 00:06:47,510 --> 00:06:50,750 And you cannot have a matrix in which there is a diagonal. 68 00:06:51,000 --> 00:06:55,910 When I is not equal to g like into three rows for Hill. 69 00:06:56,110 --> 00:07:00,300 If we draw to draw a diagonal then this one this one and this one. 70 00:07:00,440 --> 00:07:02,790 Then we divide 41 also. 71 00:07:02,780 --> 00:07:10,520 That's why in only in square matrices we have diagonals and ever be defined any metrics that uses diagonals 72 00:07:10,790 --> 00:07:15,540 will be a square animate metrics and just require one parameter. 73 00:07:15,750 --> 00:07:17,730 So that's about this one. 74 00:07:18,000 --> 00:07:20,710 And in a mattresses. 75 00:07:21,150 --> 00:07:25,110 Now some more concepts like 76 00:07:28,160 --> 00:07:32,580 let me clear this and this one. 77 00:07:32,600 --> 00:07:40,290 So now we have done with the mattresses method that how we can create with them. 78 00:07:40,310 --> 00:07:48,770 Now there are some methods like if you need to create any Eddy at a particular range like and B nought 79 00:07:50,360 --> 00:07:54,760 range that is done. 80 00:07:55,010 --> 00:07:57,670 So here here's how you can create that. 81 00:07:57,800 --> 00:08:07,290 Like if I need a matrix of one dimension up to 10 so you will get a matrix up to 10 and 10 is not included 82 00:08:07,320 --> 00:08:12,810 because in range you know that upper limit is not counted but we have 10 elements that because we have 83 00:08:12,990 --> 00:08:14,370 zero also. 84 00:08:14,370 --> 00:08:18,240 So that's how you can create any kind of array like hundreds. 85 00:08:18,420 --> 00:08:24,780 I get an array of hundred and this one is also one day not to be 2D when we have different set of these 86 00:08:24,780 --> 00:08:33,040 brackets if you want to have to be and you just directly pass something like here. 87 00:08:33,410 --> 00:08:34,610 This one for me. 88 00:08:34,690 --> 00:08:44,140 Like if you pass this one here you will get a Vandy for these like from three to 10 in which 10 is not 89 00:08:44,140 --> 00:08:44,980 included. 90 00:08:45,340 --> 00:08:49,900 And always the lower limit is included upper limit is not included. 91 00:08:49,900 --> 00:08:55,230 And if you want to have to be added with this. 92 00:08:55,240 --> 00:09:02,560 Come on like I have 50 elements then how to create that we use a different method in this one that is 93 00:09:02,560 --> 00:09:11,080 first and we would arrange a list of 50 element or we can say that at or 50 elements then don't we use 94 00:09:11,230 --> 00:09:19,540 this shape method to define the order of debt metrics like if I need a matrix of in which 50 elements 95 00:09:19,640 --> 00:09:28,800 and five rows and and columns and hit enter. 96 00:09:28,860 --> 00:09:36,810 You will get a 2D dates here you can see we have these brackets would have little and five rows and 97 00:09:36,810 --> 00:09:37,960 columns. 98 00:09:38,130 --> 00:09:41,550 So that's how you can create a 2D matrix with this one. 99 00:09:41,790 --> 00:09:44,010 And there are a number of ways you can create with anything. 100 00:09:44,130 --> 00:09:50,450 I'm just focusing on the basics one so he will understand better now. 101 00:09:50,680 --> 00:09:56,480 This is a matter of creating this one matrices done reshaping and arranging them. 102 00:09:56,530 --> 00:10:04,000 Now we have something known as Linn space that is also known as the linear space let something like 103 00:10:04,030 --> 00:10:15,340 if I have a hundred elements or not hundred if I have just organism 10 elements and I want a matrix 104 00:10:15,730 --> 00:10:21,640 or because of that edit in which we have a hundred elements each are linearly spaced means that difference 105 00:10:21,640 --> 00:10:25,360 between every two is seen then we use the land space method. 106 00:10:25,360 --> 00:10:32,830 This one is also the important one while performing the visualizations here we just use Linn and then 107 00:10:32,830 --> 00:10:40,520 space mean linear and then space then the brackets if you pass something like in this bracket faith 108 00:10:41,230 --> 00:10:42,100 you will get added. 109 00:10:42,340 --> 00:10:50,620 Because this requires more than one parameters and if you do something like this one zero comma one 110 00:10:50,980 --> 00:10:57,520 hit enter you will get a number of elements here each of which are linearly spaced if you can notice 111 00:10:57,520 --> 00:11:07,470 here zero point two then zero point four This one is for 0 8 1 6 this is it double and if you want some 112 00:11:07,470 --> 00:11:11,360 specific number of items like in 10 I just need five elements. 113 00:11:11,370 --> 00:11:16,310 Then you pass the third paragraph so that defines the how many numbers do I need. 114 00:11:16,350 --> 00:11:16,970 Hit enter. 115 00:11:17,010 --> 00:11:20,520 You will get five elements and each are linear Lisbeth. 116 00:11:20,520 --> 00:11:22,790 Like 0 2.5 then 5. 117 00:11:23,760 --> 00:11:27,080 All three are different by 2.5. 118 00:11:27,090 --> 00:11:35,190 Then we have seven point five and 10 more common example if I use 2 here I will get to 0 10 because 119 00:11:35,190 --> 00:11:44,600 the end minus 0 0 minus 10 equal if I use something like hundred here and 5 here. 120 00:11:44,610 --> 00:11:48,140 Hit enter 0 25 50 75 100. 121 00:11:48,150 --> 00:11:53,420 So here I have only five elements each of which are linearly spaced with 25. 122 00:11:53,430 --> 00:11:55,870 The difference is 25. 123 00:11:56,130 --> 00:11:58,080 That's all you get to linearly. 124 00:11:58,080 --> 00:12:01,490 That is linearly spaced. 125 00:12:01,500 --> 00:12:10,690 After that few more methods like if you have this city you want to find the maximum of this one. 126 00:12:10,730 --> 00:12:22,090 So first you need to create that one into one number that is X and B don't agree then the X you enter. 127 00:12:23,040 --> 00:12:24,960 Now here let me do both this one 128 00:12:29,010 --> 00:12:38,050 now if you find one to find the maximum of this one you just used to need need to use this one extort 129 00:12:38,920 --> 00:12:47,170 maximum and Pence you get the maximum value that is five if you need the minimum then X dot minimum 130 00:12:47,690 --> 00:12:48,640 hit enter. 131 00:12:49,450 --> 00:12:55,060 Also we have different methods for maximum and minimum about which you will learn later if you need 132 00:12:55,060 --> 00:13:01,080 to find the index of these four then you can also find the index of these one by using the argument 133 00:13:03,140 --> 00:13:08,810 after that some random values like if you want to have some random value. 134 00:13:09,020 --> 00:13:10,580 This is the last basic one. 135 00:13:10,640 --> 00:13:14,080 So if you got bored individual then please pay attention. 136 00:13:14,090 --> 00:13:16,490 This is going to be love last basic. 137 00:13:17,150 --> 00:13:25,850 So if you want to have some random value then we use and be not random that is a and b name by not random 138 00:13:26,720 --> 00:13:28,340 and in random. 139 00:13:28,340 --> 00:13:36,170 We have few methods out of which one is like if I have this one you will get five random values that 140 00:13:36,170 --> 00:13:37,870 are between zero and fun. 141 00:13:38,090 --> 00:13:42,670 So this trend is used to have random values between 0 and 1. 142 00:13:42,770 --> 00:13:46,570 If you need negative values also then you lose. 143 00:13:46,730 --> 00:13:49,120 And here that stands for negative also. 144 00:13:49,400 --> 00:13:53,030 Then you will have some negative values also in this trend of values. 145 00:13:53,030 --> 00:13:57,560 They are differently spaced and randomly choose between zero and fun. 146 00:13:57,560 --> 00:14:06,150 And here also with minus one after that if you want to have something like random value from any specific 147 00:14:09,310 --> 00:14:19,030 type like if you need integer value then you use end end then pass princes in which you want to have 148 00:14:19,050 --> 00:14:20,040 dead end of value. 149 00:14:20,110 --> 00:14:21,770 That is a forty one is selected. 150 00:14:21,890 --> 00:14:30,470 Again if you hit enter in this one different value selecting again to enter 66 again today. 151 00:14:30,880 --> 00:14:32,080 So that's how they vary. 152 00:14:32,080 --> 00:14:33,990 Again and again. 153 00:14:33,980 --> 00:14:40,840 And if you do something like this man also you will have the same dessert so that so you can have the 154 00:14:40,840 --> 00:14:45,220 random values in integer form in 0 1 form and negative also. 155 00:14:45,910 --> 00:14:53,330 So we are nearly done with all the basics in this one and one more I forget him. 156 00:14:53,330 --> 00:14:57,920 That is the index I am talking but I did not tell you there. 157 00:14:57,920 --> 00:15:04,100 That is how to find the index of this maximum value so you can find the index of that particular value 158 00:15:04,130 --> 00:15:13,190 life just like using X dot and then use IRG the stencil argument then the function whose value you want 159 00:15:13,190 --> 00:15:14,940 to need. 160 00:15:15,020 --> 00:15:16,060 Here you have 4. 161 00:15:16,070 --> 00:15:23,810 So if you count the index 0 1 2 3 and 4 this one is on for similar for minimum value. 162 00:15:25,760 --> 00:15:30,680 We have volume 0 so that's finished now. 163 00:15:30,710 --> 00:15:37,220 We have done all the basic methods that are in num by and that we are going to need innovative visualizations 164 00:15:37,830 --> 00:15:44,740 and that are the creating of mattresses creating matrices of special type like linearly spaced and within 165 00:15:44,740 --> 00:15:49,870 a range that is the range we have used range function a range. 166 00:15:49,970 --> 00:15:52,010 I think you got that one also. 167 00:15:52,640 --> 00:16:00,900 And then we have maximum minimum values there indexes and then the last one is the random values. 168 00:16:01,010 --> 00:16:02,660 So thanks for watching. 169 00:16:02,720 --> 00:16:05,470 With this one and we will continue in the next video.