to_histogram 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bucketizer.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba2aa3dfca1bb5992786030deadd4ffc569b483
|
4
|
+
data.tar.gz: 58b857484458ca438a0548db2f6f945a6c0f99ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87163c0f3ea544d88f63d7313b5dbf21dc64544e6fff56ff46c7e777e7f8fdac0af84fc89a70dbd4317f259e4006c686fa9ba5b14ec1594d037d94384c33799f
|
7
|
+
data.tar.gz: 9a6a995528dc649652839f8399d54f2687abcfef78d1d3325e9c3a698ca94bacaf471f08beb1d228a87f59a982bafb0eca1888b36a70276d30a6b517159af01e
|
data/lib/bucketizer.rb
CHANGED
@@ -15,7 +15,7 @@ module ToHistogram
|
|
15
15
|
|
16
16
|
# Special case where all of the results fit into the first bucket
|
17
17
|
if buckets[0].length == arr.length
|
18
|
-
l_index = (arr.length
|
18
|
+
l_index = (arr.length)
|
19
19
|
break
|
20
20
|
end
|
21
21
|
|
@@ -24,7 +24,7 @@ module ToHistogram
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
if(l_index
|
27
|
+
if(l_index <= (arr.length - 1))
|
28
28
|
buckets << arr[l_index..(arr.length - 1)]
|
29
29
|
end
|
30
30
|
|