isotree 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 2f1bbb1a3daca8511c9988d7975213ac466a19284bdcab1eb9a1b38b3883eb47
4
- data.tar.gz: bafd2fadac39b4e5881b7d039f2a75514953b85edd79cc07e4cabd91eda79e76
3
+ metadata.gz: b15de55d1a752d14cc97e2b5372308b2d4cb6a1e6fcfce0a05da6f769708b189
4
+ data.tar.gz: af21414cea40a26b2e291230e5d48bf4f804e1c77837a3132921b896bc617961
5
5
  SHA512:
6
- metadata.gz: cf1c9582b2bf9355bb26151b62c95d00be849594bb06390f2a9b5015ed5119b175c76cd58b4429ee186ba14333f86c8e3a8b6f87af5a04f6550b2e2751c85112
7
- data.tar.gz: 82f204ffd028cfb71840b0918c6fb5e7a741a7a2076d4dfe0c15c3f2e536fbd765be883fedc1a5e4ca73828f7429d08a22f521bc6b2e9f094ff10de6cf2eb979
6
+ metadata.gz: 8127b5402c9c9f03bd2bd475b01a5cc8fbd3900ac1517d401ff4647d634e1f1049c8de51086095b132f30217f3571f8aa9e84c5fd18a0d3ac420a84203da85b7
7
+ data.tar.gz: 63b26ee19d8c49ce33d61891110db56597221a776830eb2aaad84c6d46038cb30822431a6f30b1051289f6becab0b652d968fbd4cf065c0925d50d5ef769c89a
@@ -1,3 +1,7 @@
1
+ ## 0.1.2 (2020-08-11)
2
+
3
+ - Fixed outlier scores
4
+
1
5
  ## 0.1.1 (2020-08-10)
2
6
 
3
7
  - Fixed installation error when cereal not installed
@@ -54,8 +54,11 @@ module IsoTree
54
54
  if defined?(Numo::NArray) && x.is_a?(Numo::NArray)
55
55
  raise ArgumentError, "Input must have 2 dimensions" if x.ndim != 2
56
56
  x = x.cast_to(Numo::DFloat)
57
- numeric_data = x.to_binary
58
57
  nrows, ncols = x.shape
58
+ numeric_data = String.new
59
+ ncols.times do |i|
60
+ numeric_data << x[true, i].to_binary
61
+ end
59
62
  else
60
63
  x = x.to_a
61
64
  nrows = x.size
@@ -63,7 +66,10 @@ module IsoTree
63
66
  if x.any? { |r| r.size != ncols }
64
67
  raise ArgumentError, "All rows must have the same number of columns"
65
68
  end
66
- numeric_data = x.flatten(1).pack("d*")
69
+ numeric_data = String.new
70
+ ncols.times do |i|
71
+ numeric_data << x.map { |v| v[i] }.pack("d*")
72
+ end
67
73
  end
68
74
  raise ArgumentError, "No data" if nrows == 0
69
75
 
@@ -1,3 +1,3 @@
1
1
  module IsoTree
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isotree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane