numo-liblinear 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/numo/liblinear/liblinearext.c +4 -0
- data/ext/numo/liblinear/parameter.c +2 -2
- data/lib/numo/liblinear/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: 7938dffc0715abee4a64bbbc91434f9d4fbc075b442443d443cfc84c98676792
|
4
|
+
data.tar.gz: 280c66c821e95c06832902cefe3eae82931fed7cd9c99a56c9119149877b21f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3535760b9f5089c3bc4a46299385e0e0ba77ffc126cd6c9c64e02e00e17ed57ed8c48096773b0fc783203514d525edbc104dda50dd2ab60d592481ea84bd052
|
7
|
+
data.tar.gz: 173e630b063820b0b34727e1b8371f22fd67916bdd4e374d23cabeaa61cccad868ff3b0d618c71d55d564e6a05f54eb879a887bda98ccaca786b946a3ae04851
|
data/CHANGELOG.md
CHANGED
@@ -504,6 +504,8 @@ VALUE numo_liblinear_load_model(VALUE self, VALUE filename)
|
|
504
504
|
rb_ary_store(res, 0, param_hash);
|
505
505
|
rb_ary_store(res, 1, model_hash);
|
506
506
|
|
507
|
+
RB_GC_GUARD(filename);
|
508
|
+
|
507
509
|
return res;
|
508
510
|
}
|
509
511
|
|
@@ -538,6 +540,8 @@ VALUE numo_liblinear_save_model(VALUE self, VALUE filename, VALUE param_hash, VA
|
|
538
540
|
return Qfalse;
|
539
541
|
}
|
540
542
|
|
543
|
+
RB_GC_GUARD(filename);
|
544
|
+
|
541
545
|
return Qtrue;
|
542
546
|
}
|
543
547
|
|
@@ -46,13 +46,13 @@ struct parameter* rb_hash_to_parameter(VALUE param_hash)
|
|
46
46
|
param->weight_label = NULL;
|
47
47
|
if (!NIL_P(el)) {
|
48
48
|
param->weight_label = ALLOC_N(int, param->nr_weight);
|
49
|
-
memcpy(param->weight_label, (int32_t*)na_get_pointer_for_read(el), param->nr_weight);
|
49
|
+
memcpy(param->weight_label, (int32_t*)na_get_pointer_for_read(el), param->nr_weight * sizeof(int32_t));
|
50
50
|
}
|
51
51
|
el = rb_hash_aref(param_hash, ID2SYM(rb_intern("weight")));
|
52
52
|
param->weight = NULL;
|
53
53
|
if (!NIL_P(el)) {
|
54
54
|
param->weight = ALLOC_N(double, param->nr_weight);
|
55
|
-
memcpy(param->weight, (double*)na_get_pointer_for_read(el), param->nr_weight);
|
55
|
+
memcpy(param->weight, (double*)na_get_pointer_for_read(el), param->nr_weight * sizeof(double));
|
56
56
|
}
|
57
57
|
el = rb_hash_aref(param_hash, ID2SYM(rb_intern("p")));
|
58
58
|
param->p = !NIL_P(el) ? NUM2DBL(el) : 0.1;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-liblinear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.2.3
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Numo::Liblinear is a Ruby gem binding to the LIBLINEAR library. Numo::Liblinear
|