rmatrix 0.1.19 → 0.1.20

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: 9fdaca317864fc78691e5a7326da776a3c35d18b
4
- data.tar.gz: 7f1502ddf8c910b243f7447012223045c9632d41
3
+ metadata.gz: 676e1723b0ec4cd51300bb8bfa96f37342dc1a4c
4
+ data.tar.gz: 131b90477e3719d5f65195de1699f3dc4142b6cc
5
5
  SHA512:
6
- metadata.gz: 7302e71b8a4d550644cfa75e9b1afa90ed472ffa8f965aaeb50fe6088f695cb19d85aaa1b09cd911d740b303989b0a1351b6024b821f23a211798870f165c0a2
7
- data.tar.gz: 52f4fb7f0f9a31174817253a380c327c77d9a94ba6fdf22aceb3e9b4590119f0ac88085ade5725a3169f41e01d9d032acadf4cf7157659130b41db09fdaee70c
6
+ metadata.gz: 87513c7d13c75f1506910ed50cff4a612d30ab85a230a2028106e205f22a91d4734f1149b8c4e82748325837967be6918ef071e79f88b3153c325759dddd8d90
7
+ data.tar.gz: fed7922f48d5ea1cbf8a47a0a261f4d7d69ba782f23a96150d48b4def3182798f89b3dbd4cb4416d1447e86573adaa626f42cd03e650200aaab7aea3b2be2b7c
@@ -61,7 +61,7 @@ module RMatrix
61
61
  raw = Struct.new(:narray, :typecode).new(self.narray, self.typecode)
62
62
  def raw.[](*args, column_map: nil, row_map: nil, row_label_map: nil, column_label_map: nil)
63
63
  begin
64
- args.all?{|x| Fixnum === x } ? narray[*args.reverse] : Matrix.new(narray[*args.reverse], typecode, column_map: column_map, row_map: row_map, row_label_map: row_label_map, column_label_map: column_label_map)
64
+ args.all?{|x| 1.class === x } ? narray[*args.reverse] : Matrix.new(narray[*args.reverse], typecode, column_map: column_map, row_map: row_map, row_label_map: row_label_map, column_label_map: column_label_map)
65
65
  rescue StandardError => e
66
66
  raise IndexError.new("Error #{e.message} - accessing index at #{args}. Shape is #{narray.shape.reverse}")
67
67
  end
@@ -105,7 +105,7 @@ module RMatrix
105
105
  (0...size).each do |i|
106
106
  results[i] = i
107
107
  end
108
- when Fixnum
108
+ when 1.class
109
109
  results[index] ||= total
110
110
  total += 1
111
111
  when Array
@@ -132,7 +132,7 @@ module RMatrix
132
132
  else
133
133
  row_index = self.row_map ? unmap_index(self.row_map, args[0]) : args[0]
134
134
  column_index = self.column_map ? unmap_index(self.column_map, args[1]) : args[1]
135
- column_index = [column_index] if column_index.kind_of?(Fixnum)
135
+ column_index = [column_index] if column_index.kind_of?(1.class)
136
136
  [
137
137
  row_index,
138
138
  column_index
@@ -159,7 +159,7 @@ module RMatrix
159
159
  end
160
160
  else
161
161
  index = (map[columns] rescue nil)
162
- index = columns if !index && columns.kind_of?(Fixnum)
162
+ index = columns if !index && columns.kind_of?(1.class)
163
163
  raise "Value not present in index mapping: #{columns}" unless index
164
164
  index
165
165
  end
@@ -1,3 +1,3 @@
1
1
  module RMatrix
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmatrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter Coppieters
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2018-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler