Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy subtraction operation using numpy functions

import numpy as np
  
# Defining both the matrices
a = np.array([5, 72, 13, 100])
b = np.array([2, 5, 10, 30])
  
# Performing subtraction using arithmetic operator
sub_ans = a-b
print(sub_ans)
  
# Performing subtraction using numpy function
sub_ans = np.subtract(a, b)
print(sub_ans)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #numpy #subtraction #operation #numpy #functions
ADD COMMENT
Topic
Name
3+8 =