Articles → Numpy → copysign function in numpy

copysign function in numpy






Purpose





Example


import numpy as np

num1 = 10
num2 = -20


print("After copying the sign of num2, num1 is:", np.copysign(num1,num2))
print("After copying the sign of num1, num2 is:", np.copysign(num2,num1))



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, June 06, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250