descriptive_statistics 2.0.0 → 2.0.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: 3692ef50fac5b204943e2f89a12954beaf2b8f5e
4
- data.tar.gz: 3ebba1de3d2119bc7bd4576e6b31ab12d5e21ce5
3
+ metadata.gz: f41c7aa2782cd29511542a9b1b04a9760146598a
4
+ data.tar.gz: 28eaee66c048a3c2bb67f4515ee2391e8e00fe34
5
5
  SHA512:
6
- metadata.gz: 2dc2caafb81f25a3e4432c2b0ef4c8f373416ed945e2faa153e743bc062210787249770182ec58795571f5935caab4c509a07d2ea435adfa6f61988fb59d5f5f
7
- data.tar.gz: 11adc15ecd3ed6220a317d838e88d2b42d271fc8b13153e7de549a38286212ee26262e332fcdfe5884a4e96864bf1556a85bec8f743bac403e950929004f1e08
6
+ metadata.gz: 14aafb8721f10f2ab5bd2ed3693339149681e8d5e7f885ff221e29a8e6f8957a9743f96577bc7786d9e655920013731dac5767042c481aacb8bd74b740d64cd8
7
+ data.tar.gz: 929a130fc177a8d4221e6383b4f67076ddec50babe1ebe79d80009fa8f15c3964c4f4ad019ed430bf5d691fc4460b00dc465001aaa612f6a26f790b748acfcc9
@@ -3,6 +3,8 @@ module DescriptiveStatistics
3
3
  values = Support::convert(self)
4
4
  return unless values.size > 0
5
5
 
6
+ return values.first unless values.size > 1
7
+
6
8
  sorted = values.sort
7
9
  return sorted[-1] if p == 100
8
10
  rank = p / 100.0 * (values.number - 1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descriptive_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derrick Parkhurst
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-08-30 00:00:00.000000000 Z
15
+ date: 2014-09-02 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: Adds descriptive statistics methods to Enumerable module for use on collections
18
18
  or Numeric data