kmeans-clusterer 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kmeans-clusterer.rb +3 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef3362502d8b947a79154f0c38f00941399f3192
4
- data.tar.gz: 28d240da6a683201cf5f36c13cac2df5c21c31d8
3
+ metadata.gz: 280cf2639965cde59fcff41909375d284637825d
4
+ data.tar.gz: e9d9fc0db3828b9bfc37def487200cad77a4d5a7
5
5
  SHA512:
6
- metadata.gz: 6a2ee8ee21cd05b6ad0cc16e6db453fdd98bbba71506160b8396d5deff844a3ef7319e20895da191d7bd2562c69c407ee491fa4371c796acc6f2a8082b2ee171
7
- data.tar.gz: 98ccfaeb50eb586145853d5da8bffa8b72447c6621431a9663493aaa67867119d8242837ad365cdc6e64e1fb8f3ea5c3b46b5e76d1af577bb2f5effe5465dd3a
6
+ metadata.gz: 7cd63b7d8f844ea17972ce535d4f0b1ea29d61524351431ada328fdbf30736006739ced8f9c1b344f834c0c993f6491ef203f22761f30ef224795a6d38ee4996
7
+ data.tar.gz: 63ed5fa36fe27785c124877ac9a56d30190f55aec1a08c6ab161f79a24980f91f553c552f7956fed7d3f9bc25b4d1cbcb98df97d06e51a56c17eb5d290381019
@@ -77,7 +77,9 @@ class KMeansClusterer
77
77
  opts[:k] = k
78
78
  opts[:typecode] = TYPECODE[opts[:float_precision]]
79
79
 
80
- data = NMatrix.cast data, opts[:typecode]
80
+ unless data.is_a?(NMatrix)
81
+ data = NMatrix.cast data, opts[:typecode]
82
+ end
81
83
 
82
84
  if opts[:scale_data]
83
85
  data, mean, std = Scaler.scale(data, nil, nil, opts[:typecode])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kmeans-clusterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Buesing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray