Skip to content

Commit

Permalink
Correcting Load error in Spec Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Arafatk committed Feb 27, 2016
1 parent 2fffafc commit 4b0b375
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions spec/math_spec.rb
Expand Up @@ -342,9 +342,13 @@

begin
require 'nmatrix/atlas'
rescue LoadError
puts "atlas plugin is not available"
end

begin
expect(a.pinv).to be_within(err).of(b)
expect(a.dot(a.pinv)).to be_within(err).of(c)
# a * a.pinv = Indentity matrix if a is a square matrix
rescue NotImplementedError
pending "Suppressing a NotImplementedError when the lapacke or atlas plugin is not available"
end
Expand All @@ -356,7 +360,11 @@

begin
require 'nmatrix/atlas'
# These are the properties of a psuedo inverse matrix
rescue LoadError
puts "atlas plugin is not available"
end

begin
expect(a.dot(b.dot(a))).to be_within(err).of(a)
expect(b.dot(a.dot(b))).to be_within(err).of(b)
rescue NotImplementedError
Expand Down

0 comments on commit 4b0b375

Please sign in to comment.