Skip to content
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

cast to Float64 directly instead of using float #521

Merged
merged 1 commit into from
Mar 10, 2024
Merged

Conversation

SobhanMP
Copy link
Member

@SobhanMP SobhanMP commented Mar 7, 2024

Does this make sense?

Closes #515

julia> using SparseArrays, ForwardDiff, LinearAlgebra
julia> A = ForwardDiff.Dual.(sprand(10, 10, 0.1));
julia> qr(A)
ERROR: MethodError: no method matching Float64(::ForwardDiff.Dual{Nothing, Float64, 0})
The type `Float64` exists, but no method is defined for this combination of argument types when trying to construct it.

@SobhanMP SobhanMP requested a review from rayegun March 7, 2024 05:06
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.26%. Comparing base (a5e95ec) to head (0c8f8f3).

Files Patch % Lines
src/solvers/spqr.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #521   +/-   ##
=======================================
  Coverage   84.26%   84.26%           
=======================================
  Files          12       12           
  Lines        9122     9122           
=======================================
  Hits         7687     7687           
  Misses       1435     1435           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rayegun
Copy link
Member

rayegun commented Mar 8, 2024

What happens in the complex case?

@SobhanMP
Copy link
Member Author

SobhanMP commented Mar 9, 2024

What happens in the complex case?

The same as it used to do.

@rayegun rayegun merged commit 78dde4c into main Mar 10, 2024
6 of 9 checks passed
@rayegun rayegun deleted the somo/qrfloat64 branch March 10, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to run sparse qr produces StackOverflow when run on a sparse matrix of ForwardDiff.Dual.
3 participants