numo-narray 0.9.0.9 → 0.9.1.0

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
- SHA1:
3
- metadata.gz: '09918199887bb7a9559b43147fd5174245bd8889'
4
- data.tar.gz: 801ffe2b5cdc10afa543987c1862a5ae4eae27f5
2
+ SHA256:
3
+ metadata.gz: f25d67eb3b5fbf2fbfb211acc0b839a58500954c64224a7fb605f0516e506297
4
+ data.tar.gz: f7a1c70751bcbb89db48a7be3bfb9b519494445bb39e4e8a9b37af57441578eb
5
5
  SHA512:
6
- metadata.gz: ac932f2ad8b580607d05a86da8a6f22c17c2ec1afbde5b0f48a751c7c6b374bd8119173b104bf6e3b674716b38bf3a9a33294f8456833a2483099d9838c23def
7
- data.tar.gz: ecd2bf05f24dc79100c28fbd66d5af556dc7b410bbed1a8a5bf0e06d2cd2175ecc6ee556e1c277e5e333c464039f56dbc6dfbdf441323d6042ffe8b2126756bf
6
+ metadata.gz: 202b2db2d9e89bf17933b8d972c418a6c82bc15df08ff7bb81804575efd1e4ba7fc307b1df73f30dd4ea7ff404699a04646860c2bb09630cb1f8c4729c944f86
7
+ data.tar.gz: c512052952cbb874207d22dbd0bcc9eb59b59b5137283dcd322b5dcb33fbc9c8c8f518aa3f768288ea80d0799285b546dc488446179cebbb8a61ee3f04c99584
@@ -7,8 +7,8 @@
7
7
  #include "numo/narray.h"
8
8
 
9
9
  VALUE numo_mNMath;
10
- EXTERN VALUE numo_mDFloatMath, numo_mDComplexMath;
11
- EXTERN VALUE numo_mSFloatMath, numo_mSComplexMath;
10
+ extern VALUE numo_mDFloatMath, numo_mDComplexMath;
11
+ extern VALUE numo_mSFloatMath, numo_mSComplexMath;
12
12
  static ID id_send;
13
13
  static ID id_UPCAST;
14
14
  static ID id_DISPATCH;
@@ -1879,6 +1879,19 @@ loop_narray_with_index(ndfunc_t *nf, na_md_loop_t *lp)
1879
1879
  int i,j;
1880
1880
  int nd = lp->ndim;
1881
1881
 
1882
+ // for zero-dimensional narray
1883
+ if (nd==0) {
1884
+ switch (lp->n[0]) {
1885
+ case 0:
1886
+ return;
1887
+ case 1:
1888
+ nd = 1;
1889
+ break;
1890
+ default:
1891
+ rb_fatal("invalid narray");
1892
+ }
1893
+ }
1894
+
1882
1895
  // pass total ndim to iterator
1883
1896
  lp->user.ndim += nd;
1884
1897
 
@@ -1918,7 +1931,7 @@ VALUE
1918
1931
  #ifdef HAVE_STDARG_PROTOTYPES
1919
1932
  na_ndloop_with_index(ndfunc_t *nf, int argc, ...)
1920
1933
  #else
1921
- na_ndloop(nf, argc, va_alist)
1934
+ na_ndloop_with_index(nf, argc, va_alist)
1922
1935
  ndfunc_t *nf;
1923
1936
  int argc;
1924
1937
  va_dcl
@@ -13,8 +13,8 @@ extern "C" {
13
13
  #endif
14
14
  #endif
15
15
 
16
- #define NARRAY_VERSION "0.9.0.9"
17
- #define NARRAY_VERSION_CODE 909
16
+ #define NARRAY_VERSION "0.9.1.0"
17
+ #define NARRAY_VERSION_CODE 910
18
18
 
19
19
  #include <math.h>
20
20
  #include "numo/compat.h"
@@ -1,9 +1,9 @@
1
1
  #include "float_def.h"
2
2
 
3
- EXTERN double round(double);
4
- EXTERN double log2(double);
5
- EXTERN double exp2(double);
6
- EXTERN double exp10(double);
3
+ extern double round(double);
4
+ extern double log2(double);
5
+ extern double exp2(double);
6
+ extern double exp10(double);
7
7
 
8
8
  #define r_abs(x) fabs(x)
9
9
  #define r_sqrt(x) sqrt(x)
@@ -1,12 +1,12 @@
1
1
  #include "float_def.h"
2
2
 
3
- EXTERN double round(double);
4
- EXTERN double log2(double);
5
- EXTERN double exp2(double);
3
+ extern double round(double);
4
+ extern double log2(double);
5
+ extern double exp2(double);
6
6
  #ifdef HAVE_EXP10
7
- EXTERN double exp10(double);
7
+ extern double exp10(double);
8
8
  #else
9
- EXTERN double pow(double, double);
9
+ extern double pow(double, double);
10
10
  #endif
11
11
 
12
12
  #define m_zero 0.0
@@ -122,7 +122,7 @@ class ERB
122
122
  # skip
123
123
  elsif num==1
124
124
  f = @filename.dump
125
- line.sub!(/_erbout = (''|String\.new);/, "_erbout = CountLnString.new(#{f});")
125
+ line.sub!(/_erbout = (\+?''|String\.new);/, "_erbout = CountLnString.new(#{f});")
126
126
  elsif /^; _erbout\.force_encoding/ =~ line
127
127
  line.sub!(/^;/,";_erbout.ln(#{num});")
128
128
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: numo-narray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.9
4
+ version: 0.9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro TANAKA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-28 00:00:00.000000000 Z
11
+ date: 2017-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  version: '0'
268
268
  requirements: []
269
269
  rubyforge_project:
270
- rubygems_version: 2.6.13
270
+ rubygems_version: 2.7.3
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: alpha release of Numo::NArray - New NArray class library in Ruby/Numo (NUmerical