lowess 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3e3c92daf39f05bd619728d0366109d03be370a
4
- data.tar.gz: 542c423c91e2a9d92c909fc4f1054b31b88d285d
3
+ metadata.gz: e13380fb4e6d2b488f9943ce273ee36c84ebd4ab
4
+ data.tar.gz: 38eebc7c90406117bc8fb31786f25b09a29ecc91
5
5
  SHA512:
6
- metadata.gz: 9123b79704ea60ab6db81656709dd540106fccdc3ce1b416a7062749871efd5cb5ef2b57759a687d2ed05f707f29654515117232dada0a649e16af1660371113
7
- data.tar.gz: 221635fb56912ed5f029db8ffe09c3187c362dbd06c16c67bb4d1470ad28084a7620ce264bc97f4d76380465e71d583aecd82b074d6a61f506f7e2b88f01b2cc
6
+ metadata.gz: 2dc5e4c9b607fdcabee1c9e125782788b47afaece8d82ee681aba241c4f658149858cbc735b3a8e93a4c03715b93731fcc73358ef026b158fd901c3f0f627413
7
+ data.tar.gz: 754480684ce7d93ebb4436e06eaede6cbc55888488156ef630b1b08df0de83ce870175f3842cfda453e68e113af196c389cccf22a27615eb966114b618d26b40
@@ -25,8 +25,8 @@ lowess_ext_lowess(VALUE self, VALUE in_points, VALUE in_f, VALUE in_iter, VALUE
25
25
  double* out_ys = ALLOC_N(double, len);
26
26
  double* rw = ALLOC_N(double, len);
27
27
  double* res = ALLOC_N(double, len);
28
- VALUE* points = ALLOC_N(VALUE, len);
29
28
  VALUE point_args[2];
29
+ VALUE point;
30
30
  VALUE ret = rb_ary_new_capa(len);
31
31
  int i;
32
32
 
@@ -39,15 +39,14 @@ lowess_ext_lowess(VALUE self, VALUE in_points, VALUE in_f, VALUE in_iter, VALUE
39
39
 
40
40
  clowess(xs, ys, len, f, iter, delta, out_ys, rw, res);
41
41
 
42
+ rb_ary_resize(ret, len); /* fill with Qnil */
42
43
  for (i = 0; i < len; i++) {
43
44
  point_args[0] = DBL2NUM(xs[i]);
44
45
  point_args[1] = DBL2NUM(out_ys[i]);
45
- points[i] = rb_class_new_instance(2, point_args, Lowess_Point);
46
+ point = rb_class_new_instance(2, point_args, Lowess_Point);
47
+ RARRAY_ASET(ret, i, point);
46
48
  }
47
49
 
48
- rb_ary_cat(ret, points, len);
49
-
50
- xfree(points);
51
50
  xfree(res);
52
51
  xfree(rw);
53
52
  xfree(out_ys);
@@ -1,3 +1,3 @@
1
1
  module Lowess
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lowess
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hooper