narray_miss 1.3.1 → 1.4.0

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
  SHA1:
3
- metadata.gz: ad81e7b19996cde6cb259232a5d63498de4264ea
4
- data.tar.gz: 6a6fcb1482ed57dd4305a90468a78062beb897ac
3
+ metadata.gz: ba546505f2e55434b587a016d19ba1759bee49af
4
+ data.tar.gz: 517dd6b8cf3a9d7a4ef2449671db93c6ecffe457
5
5
  SHA512:
6
- metadata.gz: a05718777eee5284f4ce9c202acaf0994976fc50ed6f8f7c6be95325fd9da2dc0beca71c0cd9de4744eb2c0c021a988fa31463133ac4674383f9fe3c2c314c4b
7
- data.tar.gz: 0f350a12bff835850166279c8daff99cb3019c6da5ec96bcdf3e7d2c70e0de27f9ccbbd81c4e06623d0e167a3016765bd06ffa63693df7d3a220d7d57378b581
6
+ metadata.gz: 600ee611c355467360f8f4ca2ebddb671e19b3c23dbcc448e23475b1bb5b3278f9bc85071f4986bfc8073c78402a0411e7b6f097a860ec47fe6f16dd7a0f684a
7
+ data.tar.gz: 4970cbc162ebc0b97e26d001eb2db65798fe646da14c85724b05ab96bcb99671cc0a8635bf1404bfa468ccfae4dfd3c13b45e0f09e5894f79c66ceacf3e3e64c
@@ -34,26 +34,39 @@ To use NArrayMiss class, you need invoking "require 'narray_miss.rb'" in your sc
34
34
 
35
35
  =end
36
36
 
37
- if defined?(NumRu::NArray)
38
- NARRAY = NumRu::NArray
39
- elsif defined?(NArray)
37
+ case ENV["NARRAY_TYPE"]
38
+ when "narray"
39
+ require 'narray'
40
40
  NARRAY = NArray
41
- else
41
+ when "numru-narray"
42
+ require 'numru/narray'
43
+ NARRAY = NumRu::NArray
44
+ when nil
42
45
 
43
- begin
44
- require 'narray'
46
+ if defined?(NumRu::NArray)
47
+ NARRAY = NumRu::NArray
48
+ elsif defined?(NArray)
45
49
  NARRAY = NArray
46
- rescue LoadError
47
- err = $!
50
+ else
51
+
48
52
  begin
49
- require 'numru/narray'
50
- NARRAY = NumRu::NArray
53
+ require 'narray'
54
+ NARRAY = NArray
51
55
  rescue LoadError
52
- STDERR.puts "You should install numru-narray or narray"
53
- raise err
56
+ err = $!
57
+ begin
58
+ require 'numru/narray'
59
+ NARRAY = NumRu::NArray
60
+ rescue LoadError
61
+ STDERR.puts "You should install numru-narray or narray"
62
+ raise err
63
+ end
54
64
  end
65
+
55
66
  end
56
67
 
68
+ else
69
+ raise "NARRAY_TYPE (#{ENV["NARRAY_TYPE"]}) is invalid"
57
70
  end
58
71
 
59
72
 
@@ -1020,12 +1033,12 @@ go back to ((<Index>))
1020
1033
  === Mask and missing value
1021
1034
  --- NArrayMiss#set_valid(index)
1022
1035
  validate element at ((|index|)).
1023
- ((|index|)) must be (({Integer, Range, Array, or ture})).
1036
+ ((|index|)) must be (({Integer, Range, Array, or true})).
1024
1037
  --- NArrayMiss#validation(index)
1025
1038
  alias to set_valid
1026
1039
  --- NArrayMiss#set_invalid(index)
1027
1040
  invaliadate element at ((|index|)).
1028
- ((|index|)) must be (({Integer, Range, Array, or ture})).
1041
+ ((|index|)) must be (({Integer, Range, Array, or true})).
1029
1042
  --- NArrayMiss#invalidation(index)
1030
1043
  alias to set_invalid
1031
1044
  --- NArrayMiss#all_valid
@@ -1,3 +1,3 @@
1
1
  class NArrayMiss
2
- VERSION = "1.3.1"
2
+ VERSION = "1.4.0"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
2
2
  require "narray_miss"
3
3
  require "test/unit"
4
- include NumRu if defined?(:NumRu)
4
+ include NumRu if defined?(NumRu)
5
5
 
6
6
  class NArrayMissTest < Test::Unit::TestCase
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narray_miss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seiya Nishizawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray