Shadowing-Übung: ► 2. СВОЙСТВА МАССИВОВ. Функции автозаполнения | Курс по Numpy. - Englisch Sprechen Lernen mit Video

Lektion wird erstellt...
1
Здравствуйте друзья, с вами Дубинин Сергей, вы смотрите видео из курса по библиотеке NumPy.
2
В этом видео вы познакомитесь с основными свойствами массивов, а также разберем специальные функции для их формирования.
3
Перед тем как мы начнем, поставьте видео на паузу, подпишитесь на канал и нажмите на колокольчик, чтобы не пропускать новые видео.
4
Также не забывайте про задачи, которые я подготовил ко всем видео курсам, ссылку найдете в описании.
5
First, we import the library and create a massive, with which we will continue to work.
6
The function array is already known.
7
The massive has two asses and the size is 3x3.
8
The first element is enddim.
9
With its use, we get the number of asses in the massive.
10
There are only two asses.
11
The second element is size.
12
It returns the number of elements in the massive.
13
Because we have a massive size of 3 on 3, the number of elements should be 9.
14
Let's see how it is.
15
And we see that it is exactly like this.
16
The next component is Shape.
17
This component is brought to Cartage, showing what number of elements are on each of theses.
18
I'm going to perform this section.
19
In this component, we have three elements on each of theses.
20
Also, with this component, we can change the form of the mass.
21
выполню эти две строчки и мы видим что форма массива изменилась до этого он был 3 на 3
22
а теперь он имеет 9 элементов по одному элементу в каждом
23
то есть 9 на 1 о свойстве шейп мы еще подробно
24
поговорим в следующем видео а сейчас переходим свойства detail с помощью него можно how to get the data in the mass,
25
in this case it is IN32, so to change the data in the new data.
26
For this, we need to write the data in the new data.
27
I complete this array, and we see that the data has changed.
28
But it turns out that the mass has changed.
29
Here it has 9 elements, and here 9 elements.
30
таких элементов дело в том что до того как мы поменяли
31
тип данных на int 8 данные в массиве имели тип данных
32
int 32 и под каждый элемент массива было выделено по 4
33
байта в памяти а элемент с типом данных int 8 занимает
34
1 байт в памяти поэтому одно значение с типом данных int
35
32 заменилось на 4 значения с типом данных int 8 стоит отметить что при такой замене types of data,
36
and if again change the type of data on int32, then we will get the data frame.
37
Now we will see the different functions for creating massives that work faster than the array function.
38
The first function is empty.
39
It returns the type of data and the type of data.
40
For example, we will get a number of massives with 7 elements with certain values.
41
данная функция работает быстрее всех функций которые мы сегодня с вами
42
рассмотрим в эту функцию можно передать список чтобы получить массив нужного
43
размера выполню эту строчку и получаю массив у которого три элемента на нулевой оси два элемента на первой оси
44
and one element on the last one.
45
You can also install the type of data in the mass.
46
For this, in the argument Detype, we give the type of data.
47
We complete this array and get a mass of this type of data with this type of data.
48
The next function is Once.
49
It returns the mass of the size and type of data and contains only 1.
50
выполню эту ячейку и получаем массив размером 3 на 3 на
51
2 со всеми единицами еще одна полезная функция once like она
52
на вход принимает массив и возвращает массив того же размера но
53
со всеми единицами для примера я создам вот такой вот массив
54
с размером 3 на 2 и на 2 и передам его
55
функцию once like посмотрим что получится здесь хорошо видно что данная функция вернула нам massif такого же размера,
56
но вместо вот этих вот значений у нас стоят единицы.
57
Следующая функция Zeros.
58
Она возвращает массив заданного размера и типа данных и содержит только нули.
59
Выполню и получаем массив 3 на 2 и на 3 со всеми нулями.
60
Функция ZerosLike работает аналогично функции OnceLike.
61
В нее мы передаем массив и она возвращает массив такого же размера, но только со всеми
62
выполню эту ячейку вот это массив который мы передали функцию за
63
1 like а вот это то что она вернула тот же самый размер Но все элементы равны нулю.
64
Еще одна функция full.
65
В нее передается два аргумента.
66
Первый это размер массива.
67
А вторым значение которым будет заполнен весь массив.
68
Выполню эту ячейку и получаю массив размера 3 на 2 и на 3 со всеми семерками.
69
Думаю как работает функция full like вы уже догадываетесь.
70
В нее мы передаем массив и какое -нибудь число.
71
В итоге получаем массив такого же размера как и тот который мы передали.
72
но заполненный всеми семерками теперь рассмотрим как создавать массивы с числовым
73
диапазоном для этого нужно воспользоваться функции range если мы передадим сюда
74
число например семерку то получим одномерный массив с целочисленными значениями от
75
0 до 6 7 в этот диапазон не включена функцию можно
76
передать начало и конец диапазона получим вот такой вот одномерный массив с with the numbers of 7 to 16, the number of 17 is not included in this diapason.
77
In addition to the same diapason, we can also include the steps.
78
For example, we have a step 3.
79
Again, we have a standard mass of this diapason with this step 7, 10, 13 and 16.
80
As you can see, this function is very similar to the same function range of Python.
81
But there are differences in this function this is not only a single step, but also a single step.
82
In the end, we have a one -way mass of this one -way, where 10 is not in the one -way, with a single step of 0 .5.
83
We still have a basic function with which we can create any size of any size.
84
Now we have a basic function with which we can create a matrix.
85
Remember that the matrix is a This is a square table of numbers, so there should only be two axes.
86
The first function, which we consider, is MATH.
87
If we give it a set, then this function will return the matrix, which is one of the strings.
88
If you look at this function, this function will return the matrix, Two of the strings, and two of the strings.
89
This means that here is not a single mass, like this case, but a double mass.
90
So this is a matrix with one strata.
91
If the function is to give like this, then it will return to the matrix with two strata and three strata.
92
The next function is Diag.
93
This function is to change the matrix, on the main diagonal of which are the elements of this matrix.
94
But if the function is to give a matrix, then it will return the value of this mass, which will be on the main diagonal of this mass.
95
The next function is Diagflat.
96
It will turn any mass, even a two -mer mass, into a diagonal matrix, on the main diagonal of which will be left the elements of this mass.
97
All the other values will be equal to 0.
98
The function Y will return the matrix, which is on the main diagonal of this mass.
99
If we add here just a number of numbers, for example, 4, then we get a matrix of 4 on 4 with 1 on the diagonal,
100
so that we can also add any other number of numbers of matrix.
101
In this case, we get 4 on 5, but also with 1 on the diagonal.
102
If we need a 1 on the matrix, then we can use this function, We can add the number of the number of the number
103
of the number of the number of the number of the
104
number of the number of the number of the number of
105
the number of the number of the number of the number
106
of the number of the number of the number of the
107
number of the number of the number of the number of
108
the number of the number of the number of the number
109
of the number of the number of the number of the number of the number.
110
on 8 with all the units on the main diagonal and below it.
111
The next function is Trill.
112
In this function gives a two -dimensional mass.
113
And the function returns the lower triangle matrix, which is the one from the previous mass.
114
This looks like the NPRay.
115
And this is the one that returns the Trill.
116
See, all the elements above the diagonal diagonal are lost.
117
If the function Trill will be added in the список, то мы также получим нижнюю треугольную матрицу,
118
в которой нулевой столбец заполнен значением из списка с индексом 0, первый столбец из соответствующего значения в списке, ну и так далее.
119
Последняя функция, которую мы сегодня рассмотрим, функция True.
120
В нее передается также двухмерный массив, и на выходе получаем верхнюю треугольную матрицу.
121
Вот так вот выглядит массив, который мы передаем функцию.
122
А вот что получаем на выходе.
123
We can see that the elements below the main diagonal are equal to 0, so this matrix is a triangle.
124
And in the same way, you can also add a list.
125
And we get the top triangle matrix.
126
This is what we have done to the end.
127
So, if the material is better, you can do the tests and decide the task.
128
The link will be found in the description.
129
Don't forget to subscribe to the channel, leave the like, leave the comment.
130
I'm with you, I'll see you next time.

Über diese Lektion

Was ist die Shadowing-Technik?

Shadowing ist eine wissenschaftlich fundierte Sprachlerntechnik, die ursprünglich für die professionelle Dolmetscherausbildung entwickelt und durch den Polyglotten Dr. Alexander Arguelles populär gemacht wurde. Die Methode ist einfach aber wirkungsvoll: Du hörst englisches Audio von Muttersprachlern und wiederholst es sofort laut — wie ein Schatten, der dem Sprecher mit nur 1–2 Sekunden Verzögerung folgt. Anders als passives Hören oder Grammatikübungen zwingt Shadowing dein Gehirn und deine Mundmuskulatur, gleichzeitig echte Sprachmuster zu verarbeiten und zu reproduzieren. Studien zeigen, dass es Aussprachegenauigkeit, Intonation, Rhythmus, verbundene Sprache, Hörverständnis und Sprechflüssigkeit signifikant verbessert — was es zu einer der effektivsten Methoden für die IELTS Speaking-Vorbereitung und reale englische Kommunikation macht.

Shadowing-Technik: die vollständige Schritt-für-Schritt-Anleitung lesen →