gslr 0.1.2 → 0.1.3

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: 659075d2214e0e64dd7689431a8b38492ff758b8369171d970c3d31ba9fe5ba9
4
- data.tar.gz: e47f6cc7bedceb9f811444f38aa0bc0bc5cc9b8fbaeb0c9f20e853b03fa041f9
3
+ metadata.gz: 374367109a0114a6b5dfe233edfb6decf292f0be3fd2a211d72152775789b2df
4
+ data.tar.gz: dc24bcc8e1c6427a09750394b5bec0f9e0634cd9d00a7a2f26bfabda3ca9d579
5
5
  SHA512:
6
- metadata.gz: 35c109f3a1c866d29722e89ae7ee12350fad09599daf1b717baabeb58caf2541a81524174ae023ba72836d868770b2cfcaf409483fa81c60e7ed63ad083cfb43
7
- data.tar.gz: 7afa7abd2f7217e133de5b8a8baa6e6b7093072eb89bd30eb257f4db73990d4fdacd251de3d89c44969fbf20de61aab081fc989faf977d94c403ad563e4313ff
6
+ metadata.gz: 6b65b69fc217e1766ac870c9fdcf3b753e2a0cb52ce59efafc0bdcc0384f5f04c54fbbd9055e3c87449216fa735e6e1d22d0f7e3cf38047ea5f75405bf3cb981
7
+ data.tar.gz: bf9eb0963cbd1154d043b02fe2d9056501959db494329bdcd93b0d3c899ea57fd5df4d3be667f7a210413c9f35678bdf9181df5cca60e3c3986c790e8cca9a5b
@@ -1,3 +1,8 @@
1
+ ## 0.1.3 (2020-07-26)
2
+
3
+ - Improved performance
4
+ - Improved error message when GSL not found on Mac
5
+
1
6
  ## 0.1.2 (2019-12-08)
2
7
 
3
8
  - Added `covariance` and `chi2` methods
data/README.md CHANGED
@@ -101,7 +101,7 @@ Check out [the options](https://www.gnu.org/software/gsl/extras/native_win_build
101
101
  ### Ubuntu
102
102
 
103
103
  ```sh
104
- sudo apt-get install libgsl-dev
104
+ sudo apt install libgsl-dev
105
105
  ```
106
106
 
107
107
  ### Heroku
@@ -21,7 +21,12 @@ module GSLR
21
21
  rescue Fiddle::DLError => e
22
22
  retry if libs.any?
23
23
  raise e if ENV["GSLR_DEBUG"]
24
- raise LoadError, "Could not find GSL"
24
+
25
+ if e.message.include?("libgsl.dylib")
26
+ raise LoadError, "GSL not found. Run `brew install gsl`"
27
+ else
28
+ raise LoadError, "GSL not found"
29
+ end
25
30
  end
26
31
 
27
32
  # https://www.gnu.org/software/gsl/doc/html/err.html
@@ -37,7 +37,7 @@ module GSLR
37
37
  one = [1].pack("d*")
38
38
  x.each do |xi|
39
39
  str << one if intercept
40
- str << xi.pack("d*")
40
+ xi.pack("d*", buffer: str)
41
41
  end
42
42
  x_ptr[0, str.bytesize] = str
43
43
  end
@@ -66,7 +66,7 @@ module GSLR
66
66
  # pack efficiently
67
67
  str = String.new
68
68
  x.each do |xi|
69
- str << xi.zip(x_offset).map { |v, o| v - o }.pack("d*")
69
+ xi.zip(x_offset).map { |v, o| v - o }.pack("d*", buffer: str)
70
70
  end
71
71
  x_ptr[0, str.bytesize] = str
72
72
  end
@@ -1,3 +1,3 @@
1
1
  module GSLR
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gslr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-09 00:00:00.000000000 Z
11
+ date: 2020-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.0.3
104
+ rubygems_version: 3.1.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: High performance linear regression for Ruby, powered by GSL