numo-narray-alt 0.10.1 → 0.10.2

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
  SHA256:
3
- metadata.gz: 2567fb1002a21b25cf82239f1ecb39cfd3765c52847d431f814c1c1933f5af9d
4
- data.tar.gz: 9737f59071d0078da064bc1fdc983d5bacaf80e90f871297f72cefd3f944d781
3
+ metadata.gz: c9f1a4b6eb9f968492070e5e771bf6defe4071f2d1d3921a8cca91929bba0efc
4
+ data.tar.gz: 4a7551a31e4295e8a6ee71553badb806d9357628a13a089e7ff08e26768f173f
5
5
  SHA512:
6
- metadata.gz: b8191bdf1b90645a3ef109a84d6c3446b7e8321a4091ea2acd01469f71add1e4832b9acff113edc5ca5cd151a7e68cede491453e2d8040d1ecadfe3fec3ae3e7
7
- data.tar.gz: f7894fd10299190e1b2ec16a8270990edb80cc5524bd2f279983479f4b9ab266c83ec288683a63fbcffcfef09bd68946b2c939b6b91d2c6e1acd06e067f60d12
6
+ metadata.gz: 1a4139ded4b31051d36bae153848b0b744ae97274c5aa71f2083083840c38551d387d6cb0adf64ce370ec12b7a7a849f25840b08f0bde18e9a72e473b120aec1
7
+ data.tar.gz: 217f922077020d3b65d783a1a842fbea7fa910a625b3439a7c1cc9699a6e91803606e31713f9c2cda1802e7603a882a338f57c06a0b7b2c5cc8d7d54ca238ee4
@@ -278,6 +278,10 @@ void na_array_to_internal_shape(VALUE self, VALUE ary, size_t* shape) {
278
278
  void na_alloc_shape(narray_t* na, int ndim) {
279
279
  na->ndim = ndim;
280
280
  na->size = 0;
281
+ if (na->shape != NULL && na->shape != &(na->size)) {
282
+ xfree(na->shape);
283
+ na->shape = NULL;
284
+ }
281
285
  switch (ndim) {
282
286
  case 0:
283
287
  case 1:
@@ -290,10 +294,6 @@ void na_alloc_shape(narray_t* na, int ndim) {
290
294
  if (ndim > NA_MAX_DIMENSION) {
291
295
  rb_raise(nary_eDimensionError, "ndim=%d is too many", ndim);
292
296
  }
293
- if (na->shape != NULL && na->shape != &(na->size)) {
294
- xfree(na->shape);
295
- na->shape = NULL;
296
- }
297
297
  na->shape = ALLOC_N(size_t, ndim);
298
298
  }
299
299
  }
@@ -13,10 +13,10 @@ extern "C" {
13
13
  #endif
14
14
  #endif
15
15
 
16
- #define NARRAY_VERSION "0.10.1"
16
+ #define NARRAY_VERSION "0.10.2"
17
17
  #define NARRAY_VERSION_MAJOR 0
18
18
  #define NARRAY_VERSION_MINOR 10
19
- #define NARRAY_VERSION_PATCH 1
19
+ #define NARRAY_VERSION_PATCH 2
20
20
  #define NARRAY_VERSION_CODE \
21
21
  (NARRAY_VERSION_MAJOR * 10000 + NARRAY_VERSION_MINOR * 100 + NARRAY_VERSION_PATCH)
22
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: numo-narray-alt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
@@ -214,7 +214,7 @@ licenses:
214
214
  metadata:
215
215
  homepage_uri: https://github.com/yoshoku/numo-narray-alt
216
216
  changelog_uri: https://github.com/yoshoku/numo-narray-alt/blob/main/CHANGELOG.md
217
- documentation_uri: https://gemdocs.org/gems/numo-narray-alt/0.10.1/
217
+ documentation_uri: https://gemdocs.org/gems/numo-narray-alt/0.10.2/
218
218
  rubygems_mfa_required: 'true'
219
219
  post_install_message: |
220
220
  ===
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  - !ruby/object:Gem::Version
239
239
  version: '0'
240
240
  requirements: []
241
- rubygems_version: 4.0.6
241
+ rubygems_version: 4.0.3
242
242
  specification_version: 4
243
243
  summary: Numo::NArray Alternative is a project forked from Numo::NArray.
244
244
  test_files: []