00:00Hello everyone.
00:02In this video, what do you see?
00:04Broadcasting and vectorized operation.
00:06What do you see?
00:08What do you see?
00:10Paraple and scene.
00:12Let's see this video.
00:20Broadcasting.
00:22Broadcasting is one mechanism.
00:24If you use it,
00:26what do you do?
00:28Arrays in one element,
00:30we apply a specific operation.
00:32What do you see?
00:34Addition, subtraction,
00:36multiplication, division.
00:38These operations,
00:40one element of arrays
00:42we apply.
00:44This is broadcasting.
00:46What shape,
00:48what size,
00:501D, 2D, 3D.
00:52We apply this broadcasting.
00:54First,
00:55we import.
00:56We create an array.
00:58Like,
00:591D array
01:004, 9, 10.
01:014, 9, 16.
01:02That means,
01:03we create three elements.
01:04In this case,
01:05let's say,
01:06array 1,
01:07plus 10.
01:08What do we need to do?
01:10What do we need to do?
01:11In this case,
01:12we add 10 to 1 element.
01:14So,
01:1610 plus 4,
01:1814.
01:1910 plus 9,
01:2019.
01:2110 plus 16,
01:2226.
01:23So,
01:24in this case,
01:25over elements of arrays
01:26in this specific operation,
01:27that is,
01:28plus 10,
01:29add.
01:30This is what
01:31broadcasting.
01:32So,
01:33it is a mechanism
01:34that allows numpy
01:35to perform
01:36element-wise operation.
01:37Okay,
01:38okay,
01:39here,
01:40on arrays.
01:41And arrays
01:42different types
01:43or shape
01:44next.
01:45Now,
01:46array 1
01:48create
01:49array 1
01:50here,
01:51here,
01:52in this case,
01:53it's
01:54here,
01:55here,
01:56here,
01:57here,
01:58here,
01:59here,
02:00here,
02:01here,
02:02here,
02:03this
02:07is
02:09this
02:10one
02:11here,
02:13here,
02:16here,
02:17here,
02:18this
02:19next
02:20here,
02:21here,
02:229 plus 5 is 13
02:2316 plus 5 is 21
02:26So 9 plus 5 is 14
02:27Aadith 16 plus 5 is 21
02:29In the math over elements
02:315 is 80
02:32Here is the next subtraction
02:34X minus 15 na over element
02:365 is subtraction
02:39So 4 minus 5 is minus 1
02:40Aadith 9 minus 5 is 4
02:4316 minus 5 is 11
02:45Even the subtraction
02:46Aadith multiplication
02:48Aadith over element
02:49Aadith multiplication
02:50So by 2
02:52So we'll get
02:5318
02:5416 x 2
02:5632
02:57Aadith division
02:58Aadith floor division
03:00Panyall
03:00So division
03:01numberut
03:02Float value
03:05Float division
03:07Numberut
03:09Exponensation
03:114
03:144 square
03:15Вы
03:1616
03:16Aadith
03:172
03:17Second element is 9. 9 square is 81. So 16, 81. That is 16 square is 226. So this is the over element of square. Next reminder. Reminder
03:30So this is the over element of square. Next is the over element of square. So this is the over element of square.
03:51Next, this is the over element of square. Now this is the over element of square. Now this is the over element of square.
04:13columns. So, if we add addition
04:18to 1, 2, 3
04:22we will get the data we will get the data
04:26we will get the data we will get the data. So, if we add
04:311 plus 1, 2. Next, 2 plus 2, 4
04:363 plus 3, 6. Next, 4 plus 1, 5
04:415 plus 2, 7. Then, 6 plus 3, 9. So, in the
04:46three, array one create. Now, if we add
04:49the elements in the operation, we have three columns
04:54so, there are three data that we will pass. Now, we will get the error.
04:58Now, one small change, comma, 5
05:03What do we do? First row, first element
05:09first element, add 1, add 1, add 2. Then, this row
05:15first row, first row, first data we will add. So, 4 plus 1, 5
05:19Next, 2 plus 3, 5. Then, 5 plus 3, 8. Then, 3 plus 5, 8. Then, 6 plus 5, 11.
05:31Okay. Now, two, first, 1, 4 plus 4, 7 plus 3, 8 plus 5, 9 plus 3, 8 plus 5. Again, 1 pull our
05:43choose left, to double, so,
05:455. This
05:48This is just a list of elements.
05:56If we add an array, we need broadcasting.
05:59If we add one element, we need to add one element.
06:04If we pass the same type, we need to add one operation.
06:09If we add an array, we need to add one element,
06:14we need to add one element.
06:20This is broadcasting.
06:24Next, vectorized operation.
06:27Vectorized operation is broadcasting.
06:30We need to apply the entire array.
06:35Array-wise operation.
06:39Array-1 is equal to 4960.
06:41Array-2 is equal to 3510.
06:43This is the one-dimensional array.
06:45Array-1 plus Array-2
06:47This is the introduction video of benefits.
06:51This is the vectorized operation.
06:53Array-1 is the first element.
06:55Array-1 is equal to 4960.
06:59Array-2 is equal to 3510.
07:01Array-3, 510.
07:02This is the element-wise operation.
07:04This is the element-wise operation.
07:054-3 is equal to 7.
07:07Then, 9 plus 5 is equal to 14.
07:0916 plus 10 is equal to 26.
07:13This is the result.
07:15Array-1 is equal to 5010.
07:16This is the result.
07:17This is the result.
07:18This is the result.
07:19This is the result.
07:20This is the result.
07:21This is the result.
07:22So, Array-1 plus Array-2
07:24Array-2 is the point-wise.
07:25This is the result.
07:26This is the result.
07:27This is the result.
07:28This is the result.
07:29The result is the use of two Array-2,
07:31entire Arrays.
07:32The operation performed.
07:33The vectorized operation.
07:34Next.
07:35Next.
07:36Here we have subtraction, multiplication, power, all of them perform.
07:41Vectorized operations.
07:43Next.
07:44Multiplication.
07:45Try.
07:46So multiplication.
07:47RA1 into RA2.
07:50We have to do what we have done.
07:54RA1 and RA2.
07:564, 9, 16.
07:58Just separation.
07:593, 5, 10.
08:03So 4 into 3, 12.
08:059, 5 star, 45.
08:07Then 16, 10 star, 160.
08:08So in the result 1, we have to take care of it.
08:10So that we have to take care of it.
08:11So we have to take care of it.
08:11So we have to take care of it.
08:1512, 45, 160.
08:17If we take care of it, we have to take care of it.
08:19RA1 and RA2 divided by 1.
08:21What do we have to take care of it?
08:224 divided by 3, 9 divided by 5, 16 divided by 10.
08:27So the first array is considered to take care of it.
08:29The first operation is performed by the factorized operation.
08:32So we have to take care of it.
08:33So we have to take care of it.
08:33So we have to take care of it.
08:34So we have to take care of it.
08:35So we have to take care of it.
08:37So we have to take care of it.
08:38So we have to take care of it.
08:39So we have to take care of it.
08:40So we have to take care of it.
08:41Please take care of it.
08:42the best operation
08:44the best operation
08:46the best operation
08:48this is the difference
08:50the single element
08:52the element is added
08:54the entire array
08:56the performance
08:58operations
09:00operation
09:02we support
09:04this is the
09:06broadcasting
09:08and vectorized operation
09:10thank you
Comments