This vIdeo is a Discussion about how to subtract two arrays in numpy
Syntax:
array1-array2
example :
import numpy as np
a=np.array([1,2,3,4])
b=np.array([4,5,6,7])
a-b
out put:
array([-3,-3,-3,-3])
Important Points:
1.- is used to perform subtraction of two arrays.
2. shape of two arrays should be same
Otherwise numpy throws value error
Disclaimer :
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use
permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.