NumPy Tutorial - NumPy Math Operation and Broadcasting

NumPy Tutorial - NumPy Math Operation and Broadcasting

We’ll cover operations in NumPy in this chapter, like basic arithmetic operations and matrix operations. Let’s start with basic arithmetic operation. NumPy Arithmetic Operation Addition, subtraction, multiplication and division are the most basic arithmetic operations in NumPy. They are similar to normal arithmetic operations between numbers. import numpy as np arrayA = np.array([[1, 2, 3],[4, 5, 6],[7, 8, 9]]) arrayB = arrayA.T #array([[1, 2, 3], # [4, 5, 6], # [7, 8, 9]]) arrayB = arrayA.

Jun 25, 2020

Tags

Most Popular Articles

Recently Updated Articles