Q:

Write a NumPy program to get the largest integer smaller or equal to the division of the inputs

0

Write a NumPy program to get the largest integer smaller or equal to the division of the inputs.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np
x = [1., 2., 3., 4.]
print("Original array:")
print(x)
print("Largest integer smaller or equal to the division of the inputs:")
print(np.floor_divide(x, 1.5))

Sample Output:

Original array:                                                        
[1.0, 2.0, 3.0, 4.0]                                                   
Largest integer smaller or equal to the division of the inputs:        
[ 0.  1.  2.  2.]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now