-
Notifications
You must be signed in to change notification settings - Fork 133
Fix det_exact for ruby object #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -946,7 +946,6 @@ | |
|
||
context "determinants" do | ||
ALL_DTYPES.each do |dtype| | ||
next if dtype == :object | ||
context dtype do | ||
before do | ||
@a = NMatrix.new([2,2], [1,2, | ||
|
@@ -968,13 +967,19 @@ | |
end | ||
end | ||
it "computes the determinant of 2x2 matrix" do | ||
expect(@a.det).to be_within(@err).of(-2) | ||
if dtype != :object | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like you're not testing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not testing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh! I see now. |
||
expect(@a.det).to be_within(@err).of(-2) | ||
end | ||
end | ||
it "computes the determinant of 3x3 matrix" do | ||
expect(@b.det).to be_within(@err).of(-8) | ||
if dtype != :object | ||
expect(@b.det).to be_within(@err).of(-8) | ||
end | ||
end | ||
it "computes the determinant of 4x4 matrix" do | ||
expect(@c.det).to be_within(@err).of(-18) | ||
if dtype != :object | ||
expect(@c.det).to be_within(@err).of(-18) | ||
end | ||
end | ||
it "computes the exact determinant of 2x2 matrix" do | ||
if dtype == :byte | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on this. @cjfuller Just want to check this with you since you wrote the register/unregister functions.