narray 0.6.0.9 → 0.6.1.1

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
  SHA1:
3
- metadata.gz: b502e43bb2703b09703eab484b27a2230c7f215f
4
- data.tar.gz: b1bcbb6b5388d48fac66d206c42ddfb6cc533481
3
+ metadata.gz: bc84e07d3c12ee40beb2e740a8ff2757ab81c8eb
4
+ data.tar.gz: fd3071c8c7072c92b5d048689ded0eac62156196
5
5
  SHA512:
6
- metadata.gz: 68631b41d59afb56f9cb006d8959b9c74f8f9e1f9ab9aa4fcf650ea08b639566c9e29ae74b191ee60feb24393c088d9ff5c687b4a9c8d6211a513aadd1566535
7
- data.tar.gz: 3ebb0656301126842e704047c8c331d098f2497dae23b64620b10fc751f3f1548865c98e6b359d07d6e5eb7c912cd387bcd3dce84fdff5587aa17e4bc08f01fb
6
+ metadata.gz: 96702352e0b774fe269762f95a2522589b63b728af5cafd6e90cb023d1a07ac009d3c63b76ab8c46c4dfd325625fe36751012d97ae6adf753aa196cd05cf5903
7
+ data.tar.gz: 53e96375a5b51819cc02805a850eed4e73b3019446f17bde794d8f52802ecca77ef68843b31b3220db9655e151e2b79161abf0f83189af64b50cdf7149126c68
@@ -1,8 +1,9 @@
1
1
  # Ruby/NArray
2
2
 
3
- * ver 0.6.0.9 (2014-05-29)
3
+ * ver 0.6.1.0 (2014-06-02)
4
4
  * [Home page](http://masa16.github.io/narray/index.ja.html)
5
- * [リポジトリ](https://github.com/masa16/narray)
5
+ * [GitHub Repository](https://github.com/masa16/narray)
6
+ * [RubyGems](https://rubygems.org/gems/narray)
6
7
  * [NArrayメソッド一覧](https://github.com/masa16/narray/blob/master/SPEC.ja.txt)
7
8
 
8
9
  ## Ruby/NArrayの特徴:
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Ruby/NArray
2
2
 
3
- * ver 0.6.0.9 (2014-05-29)
3
+ * ver 0.6.1.0 (2014-06-02)
4
4
  * [Home page](http://masa16.github.io/narray/)
5
- * [Repository](https://github.com/masa16/narray)
5
+ * [GitHub Repository](https://github.com/masa16/narray)
6
+ * [RubyGems](https://rubygems.org/gems/narray)
6
7
  * [NArray method list](https://github.com/masa16/narray/blob/master/SPEC.en.txt)
7
8
 
8
9
  ## NArray Features:
@@ -91,7 +91,7 @@ class NMatrix < NArray
91
91
  (2..n).each{ m *= self }
92
92
  m
93
93
  else
94
- raise TypeError,"Illegal operation: NMatrix ** %s" % other.class
94
+ raise TypeError,"Illegal operation: NMatrix ** %s" % n.class
95
95
  end
96
96
  end
97
97
 
@@ -1096,18 +1096,22 @@ static VALUE
1096
1096
  char *p;
1097
1097
  void (*func)();
1098
1098
 
1099
- GetNArray(obj,ary);
1099
+ if (rb_block_given_p()) {
1100
+ GetNArray(obj,ary);
1100
1101
 
1101
- p = ary->ptr;
1102
- sz = na_sizeof[ary->type];
1103
- func = SetFuncs[NA_ROBJ][ary->type];
1102
+ p = ary->ptr;
1103
+ sz = na_sizeof[ary->type];
1104
+ func = SetFuncs[NA_ROBJ][ary->type];
1104
1105
 
1105
- for ( i=ary->total; i-->0; ) {
1106
- (*func)( 1, &v, 0, p, 0 );
1107
- rb_yield(v);
1108
- p += sz;
1106
+ for ( i=ary->total; i-->0; ) {
1107
+ (*func)( 1, &v, 0, p, 0 );
1108
+ rb_yield(v);
1109
+ p += sz;
1110
+ }
1111
+ return Qnil;
1112
+ } else {
1113
+ return rb_funcall(obj, rb_intern("to_enum"), 0);
1109
1114
  }
1110
- return Qnil;
1111
1115
  }
1112
1116
 
1113
1117
 
@@ -23,8 +23,8 @@
23
23
  # include <sys/types.h>
24
24
  #endif
25
25
 
26
- #define NARRAY_VERSION "0.6.0.9"
27
- #define NARRAY_VERSION_CODE 609
26
+ #define NARRAY_VERSION "0.6.1.1"
27
+ #define NARRAY_VERSION_CODE 611
28
28
 
29
29
  /*
30
30
  Data types used in NArray :
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.9
4
+ version: 0.6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Tanaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-29 00:00:00.000000000 Z
11
+ date: 2015-01-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Numerical N-dimensional Array class
14
14
  email: masa16.tanaka@gmail.com