Articles → Numpy → trunc function in numpy

trunc function in numpy






Purpose





Example


import numpy as np

in_array = np.array([-9.5, -0.5, 0, 1.5,5.5] )


print("Trunc Operation:", np.trunc(in_array))



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, June 24, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250