Suppose if iam having below array with min,max in the list of elemnet in the below array,it should divide into 10 chunks,
Z=array([[10, 20],
[5, 30],
[20, 30],
[15, 40],
[40, 55]])
it should divide 10 chunks,if we take first element of the array[10,20],so array should be divided into bucket list like this :array([[10-11],[11-12][12-13]....[19-20]]
Next time this bucket should be updated, consider next element say [5,30] where min 5 is less than 10 and max 30 is greater 20.Bucket should be update into 10 equal parts again and this needs to repeated.Bucket remains same if above condition not satisfies.
I tried using for loop, not getting the proper result.