Which function is used to calculate the element-wise remainder of division in NumPy?
Correct answer
B. np.remainder()
17 views
B. np.remainder()
17 views
np.remainder() returns the element-wise remainder of division; the result takes the sign of the divisor, like Python's % operator.
np.mod() is an alias for the same function. np.divmod() returns quotient and remainder together, and np.divide() performs true division.
Practise more Data Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.