2-D Arrays
What is a two-dimensional array?
In the general case, two-dimensional arrays are called matrices: such mathematical structures that consist of rows and columns. If it will be easier for you, then you can represent the matrix as a table.
To create a 2-D array, pass list of lists as the parameter of np.array()
function (nested lists must be the same length).
12345import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Displaying array print(arr)
Дякуємо за ваш відгук!
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Запитайте мені питання про цей предмет
Сумаризуйте цей розділ
Покажіть реальні приклади
Awesome!
Completion rate improved to 2.7
2-D Arrays
Свайпніть щоб показати меню
What is a two-dimensional array?
In the general case, two-dimensional arrays are called matrices: such mathematical structures that consist of rows and columns. If it will be easier for you, then you can represent the matrix as a table.
To create a 2-D array, pass list of lists as the parameter of np.array()
function (nested lists must be the same length).
12345import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Displaying array print(arr)
Дякуємо за ваш відгук!