Arrays Operations
NumPy arrays not only perform faster, but also support different operations, that are not available for built-in lists.
For example, you can add/subtract/multiply/divide by a certain number all the array elements. Or you can multiply two arrays element-by-element.
123456789# Import the library import numpy as np # Creating two arrays arr1 = np.array([1, 2, 3]) arr2 = np.array([10, 20, 30]) # Perform some arrays operations print(arr1 + 3) print(arr1 * arr2)
Дякуємо за ваш відгук!
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Запитайте мені питання про цей предмет
Сумаризуйте цей розділ
Покажіть реальні приклади
Awesome!
Completion rate improved to 2.7
Arrays Operations
Свайпніть щоб показати меню
NumPy arrays not only perform faster, but also support different operations, that are not available for built-in lists.
For example, you can add/subtract/multiply/divide by a certain number all the array elements. Or you can multiply two arrays element-by-element.
123456789# Import the library import numpy as np # Creating two arrays arr1 = np.array([1, 2, 3]) arr2 = np.array([10, 20, 30]) # Perform some arrays operations print(arr1 + 3) print(arr1 * arr2)
Дякуємо за ваш відгук!