Articles → Numpy → Signbit Function In NumpySignbit Function In NumpyIn this article, we will discuss the "signbit" function in NumPy.Purpose Signbit function checks if the number is negative or not.Example import numpy as np print("Is -12.5 negative:", np.signbit(-12.5)) print("Is 12.5 negative:", np.signbit(12.5))Output Click to EnlargePosted By - Karan Gupta Posted On - Thursday, June 6, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
import numpy as np print("Is -12.5 negative:", np.signbit(-12.5)) print("Is 12.5 negative:", np.signbit(12.5))
Query/Feedback