red-arrow-nmatrix 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fa1578cf261ca27a49745b852d4cec4b476c359f384b8acf07ac0e8412d1334
4
- data.tar.gz: 1b3b27deeb2b8b1c64a47cb6d1ee1566f0d9c4ac4f4e971a5682702edbc1e2b5
3
+ metadata.gz: 98458b05702265e2220edb184936192069c9ec217552ed49b230fa2cd5bccd16
4
+ data.tar.gz: 9e86d911c319ea5db8184429e293398e8041a005199f89d34642f6f8050d95cb
5
5
  SHA512:
6
- metadata.gz: 2858c637bc8e557dc50f737a323879c8d3605e0b6fd79687f7ce4af26c421fd6e8b0df72488c66a22c5b9f2ac22427d7deca56f51a27837083a0a15188fae8b9
7
- data.tar.gz: 6cf14da414cf69328e404807e771e346285071b6737fde0ac78c49bc9b32afc8b2274d3e7ca4d376bc23e8988d6e0b92953d9d8c67be565be0636bde2260415a
6
+ metadata.gz: deff60e0a39804bd4d7528c3b933db087b7d06b72e0cb62d88b8384dff78b6ff264bd5a3e31747f2fccad24fd4aa14cf52ccd8c9bf6da1c98feec8e61b0f19e6
7
+ data.tar.gz: 47ad21c3f1266239726f8787d512dc6c39c86d576a573ab60761a948ab30d4544386951d188e3035b2afdb8af01284d1aa0df93cb0f6a3bbbea0074d78963414
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 0.0.4 - 2021-03-03
4
+
5
+ ### Improvements
6
+
7
+ * Require Apache Arrow GLib 3.0.0 or later.
8
+
3
9
  ## 0.0.3 - 2018-03-23
4
10
 
5
11
  ### Improvements
@@ -61,17 +61,28 @@ garrow_type_to_nmatrix_dtype(GArrowType arrow_type)
61
61
  case GARROW_TYPE_HALF_FLOAT:
62
62
  case GARROW_TYPE_STRING:
63
63
  case GARROW_TYPE_BINARY:
64
+ case GARROW_TYPE_FIXED_SIZE_BINARY:
64
65
  case GARROW_TYPE_DATE32:
65
66
  case GARROW_TYPE_DATE64:
66
67
  case GARROW_TYPE_TIMESTAMP:
67
68
  case GARROW_TYPE_TIME32:
68
69
  case GARROW_TYPE_TIME64:
69
- case GARROW_TYPE_INTERVAL:
70
- case GARROW_TYPE_DECIMAL:
70
+ case GARROW_TYPE_INTERVAL_MONTHS:
71
+ case GARROW_TYPE_INTERVAL_DAY_TIME:
72
+ case GARROW_TYPE_DECIMAL128:
73
+ case GARROW_TYPE_DECIMAL256:
71
74
  case GARROW_TYPE_LIST:
72
75
  case GARROW_TYPE_STRUCT:
73
- case GARROW_TYPE_UNION:
76
+ case GARROW_TYPE_SPARSE_UNION:
77
+ case GARROW_TYPE_DENSE_UNION:
74
78
  case GARROW_TYPE_DICTIONARY:
79
+ case GARROW_TYPE_MAP:
80
+ case GARROW_TYPE_EXTENSION:
81
+ case GARROW_TYPE_FIXED_SIZE_LIST:
82
+ case GARROW_TYPE_DURATION:
83
+ case GARROW_TYPE_LARGE_STRING:
84
+ case GARROW_TYPE_LARGE_BINARY:
85
+ case GARROW_TYPE_LARGE_LIST:
75
86
  default:
76
87
  break;
77
88
  }
@@ -132,25 +143,25 @@ nmatrix_dtype_to_garrow_data_type(nm_dtype_t nmatrix_type)
132
143
 
133
144
  switch (nmatrix_type) {
134
145
  case BYTE:
135
- arrow_data_type = garrow_uint8_data_type_new();
146
+ arrow_data_type = GARROW_DATA_TYPE(garrow_uint8_data_type_new());
136
147
  break;
137
148
  case INT8:
138
- arrow_data_type = garrow_int8_data_type_new();
149
+ arrow_data_type = GARROW_DATA_TYPE(garrow_int8_data_type_new());
139
150
  break;
140
151
  case INT16:
141
- arrow_data_type = garrow_int16_data_type_new();
152
+ arrow_data_type = GARROW_DATA_TYPE(garrow_int16_data_type_new());
142
153
  break;
143
154
  case INT32:
144
- arrow_data_type = garrow_int32_data_type_new();
155
+ arrow_data_type = GARROW_DATA_TYPE(garrow_int32_data_type_new());
145
156
  break;
146
157
  case INT64:
147
- arrow_data_type = garrow_int64_data_type_new();
158
+ arrow_data_type = GARROW_DATA_TYPE(garrow_int64_data_type_new());
148
159
  break;
149
160
  case FLOAT32:
150
- arrow_data_type = garrow_float_data_type_new();
161
+ arrow_data_type = GARROW_DATA_TYPE(garrow_float_data_type_new());
151
162
  break;
152
163
  case FLOAT64:
153
- arrow_data_type = garrow_double_data_type_new();
164
+ arrow_data_type = GARROW_DATA_TYPE(garrow_double_data_type_new());
154
165
  break;
155
166
  case COMPLEX64:
156
167
  case COMPLEX128:
@@ -165,7 +176,7 @@ nmatrix_dtype_to_garrow_data_type(nm_dtype_t nmatrix_type)
165
176
  static VALUE
166
177
  rb_nmatrix_to_arrow(VALUE self)
167
178
  {
168
- GArrowDoubleDataType *data_type;
179
+ GArrowDataType *data_type;
169
180
  GArrowBuffer *data;
170
181
  GArrowTensor *tensor;
171
182
  VALUE rb_tensor;
@@ -180,7 +191,7 @@ rb_nmatrix_to_arrow(VALUE self)
180
191
  }
181
192
  data = garrow_buffer_new((const guint8 *)NM_DENSE_ELEMENTS(self),
182
193
  NM_SIZEOF_DTYPE(self) * NM_DENSE_COUNT(self));
183
- tensor = garrow_tensor_new(GARROW_DATA_TYPE(data_type),
194
+ tensor = garrow_tensor_new(data_type,
184
195
  data,
185
196
  (gint64 *)(NM_STORAGE(self)->shape),
186
197
  NM_DIM(self),
@@ -14,7 +14,7 @@
14
14
 
15
15
  require "mkmf-gnome2"
16
16
 
17
- required_pkg_config_package("arrow-glib")
17
+ required_pkg_config_package(["arrow-glib", 3])
18
18
 
19
19
  [
20
20
  ["glib2", "ext/glib2"],
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright 2017-2018 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module ArrowNMatrix
16
- VERSION = "0.0.3"
16
+ VERSION = "0.0.4"
17
17
  end
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
43
43
  spec.extensions = ["ext/arrow-nmatrix/extconf.rb"]
44
44
  spec.test_files += Dir.glob("test/**/*")
45
45
 
46
- spec.add_runtime_dependency("red-arrow")
46
+ spec.add_runtime_dependency("red-arrow", ">= 3.0.0")
47
47
  spec.add_runtime_dependency("nmatrix")
48
48
 
49
49
  spec.add_development_dependency("bundler")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-arrow-nmatrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-23 00:00:00.000000000 Z
11
+ date: 2021-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: red-arrow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nmatrix
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -126,7 +126,7 @@ description: 'Red Arrow NMatrix adds `Arrow::Tensor#to_nmatrix` for Apache Arrow
126
126
  NMatrix conversion. Red Arrow NMatrix adds `NMatrix#to_arrow` for NMatrix to Apache
127
127
  Arrow conversion.
128
128
 
129
- '
129
+ '
130
130
  email:
131
131
  - kou@clear-code.com
132
132
  executables: []
@@ -168,14 +168,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.7.6
171
+ rubygems_version: 3.2.3
173
172
  signing_key:
174
173
  specification_version: 4
175
174
  summary: Red Arrow NMatrix is a library that provides converters between Apache Arrow's
176
175
  tensor data (`Arrow::Tensor`) and NMatrix's matrix data (`NMatrix`).
177
176
  test_files:
178
- - test/test-to-arrow.rb
179
177
  - test/helper.rb
180
178
  - test/run-test.rb
179
+ - test/test-to-arrow.rb
181
180
  - test/test-to-nmatrix.rb