-
Notifications
You must be signed in to change notification settings - Fork 133
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
fixes det method for dtype object #575
Conversation
Seems like you're missing some code here. |
@MohawkJohn i do not understand what part of my code is missing could you please help me out with this. Is this not the correct way to implement it? |
Let's try this: can you please explain to me how your implementation works? |
In the det function i type cast the object dtype to float. |
What happens if the Object can't be cast to a decimal value? (For that matter, why would we have an |
@MohawkJohn in lib/nmatrix/math.rb in the method det .getrf is being used on a copy(with typecasted dtype) of the matrix whose determinant is to be found out. should i throw an exception if it cannot be cast into decimal value? or is there any other way to fix the issue? |
should i change the det function so that it does not require LAPACK function and the i can follow as in PR #514 ? |
@npriyadarshi Let's rewind a bit. Why do we have an |
Object dtypes represent ruby objects i mean any variable in ruby be it string,decimal, integer etc. I dont actually understand why we have dtype object. |
We have object dtypes because matrix operations like determinants exist not only for the set of nxn integer matrices and the set of nxn real matrices, but others as well. We cannot possibly create a dtype for each of these cases because we can't envision them all. So the Ruby object dtype allows people to use those algorithms on any arbitrary domain. |
I'm going to close this for now. You're welcome to discuss on the Google Group, or reopen when you think you've got a solution ready. |
@MohawkJohn In continuation with the work done by you in PR #501.