Answers for "Return the indices of the bins"

0

Return the indices of the bins

import numpy as np 

x = np.array([0.2, 6.4, 3.0, 1.6])
bins = np.array([0.0, 1.0, 2.5, 4.0, 10.0])

out = np.digitize(x,bins=bins)
Posted by: Guest on June-02-2020

Code answers related to "Return the indices of the bins"

Python Answers by Framework

Browse Popular Code Answers by Language