enumerable-statistics 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/ext/enumerable/statistics/extension/statistics.c +8 -2
- data/lib/enumerable_statistics/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e593e551f4f9b857a009db71093abab619e96680c4d15fc0eaa3a96c6e622bd4
|
4
|
+
data.tar.gz: eb449c789843e7e3e2c435890b8a9281d49cb6cdaad4ebbfc979b959413f617f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8866ba9d47c0715b82ffe7370b1fe8f683e1c1a17fd2dfee50db06c536cfa25b469bbf94a0f23c24ce2179c9d81203b761f8d17beadf113752b4f89490a48a2f
|
7
|
+
data.tar.gz: 942e4dacc202cef906e631c38d9450045f9712ffed811b35f7f28fafeecc0e92f70196b0d8d8053423266d60210a1f556ed600d4c2c2b0ee5320aa97830cab47
|
data/CHANGELOG.md
CHANGED
@@ -2284,7 +2284,7 @@ ary_histogram(int argc, VALUE *argv, VALUE ary)
|
|
2284
2284
|
{
|
2285
2285
|
VALUE arg0, opts, edge, weights;
|
2286
2286
|
int left_p;
|
2287
|
-
long nbins;
|
2287
|
+
long nbins, nweights, i;
|
2288
2288
|
|
2289
2289
|
rb_scan_args(argc, argv, "01:", &arg0, &opts);
|
2290
2290
|
if (NIL_P(arg0)) {
|
@@ -2296,7 +2296,13 @@ ary_histogram(int argc, VALUE *argv, VALUE ary)
|
|
2296
2296
|
left_p = opt_closed_left_p(opts);
|
2297
2297
|
|
2298
2298
|
edge = ary_histogram_calculate_edge(ary, nbins, left_p);
|
2299
|
-
|
2299
|
+
|
2300
|
+
nweights = RARRAY_LEN(edge) - 1;
|
2301
|
+
weights = rb_ary_new_capa(nweights);
|
2302
|
+
for (i = 0; i < nweights; ++i) {
|
2303
|
+
rb_ary_store(weights, i, INT2FIX(0));
|
2304
|
+
}
|
2305
|
+
|
2300
2306
|
histogram_weights_push_values(weights, edge, ary, left_p);
|
2301
2307
|
|
2302
2308
|
return rb_struct_new(cHistogram, edge, weights,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enumerable-statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Murata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -275,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
275
|
- !ruby/object:Gem::Version
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
|
-
rubygems_version: 3.
|
278
|
+
rubygems_version: 3.1.2
|
279
279
|
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: Statistics features for Enumerable
|