Skip to content

Define complextype, realtype, imagtype #52

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

Merged
merged 1 commit into from
Jun 12, 2025
Merged

Define complextype, realtype, imagtype #52

merged 1 commit into from
Jun 12, 2025

Conversation

mtfishman
Copy link
Member

@mtfishman mtfishman commented Jun 12, 2025

Define type space versions of Base.complex, Base.real, and Base.imag, analogous to #51 which defines similartype as a type space version of Base.similar.

The motivation for this is making block sparse matrix SVD more generic, specifically this helps generalize these lines: https://github.com/ITensor/BlockSparseArrays.jl/blob/f9b971b7aafb2cdaf828160863da87676ba07f0f/src/factorizations/svd.jl#L27-L30 where we construct the block type of the matrix of singular values. (This is one approach to that, another approach could be to infer the block types of U, S, and V by calling Base.promote_op(svd_compact, blocktype(A)), I'll play around with both approaches but even if this PR isn't used for that particular case I think it is still useful.)

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.84%. Comparing base (8118760) to head (a433970).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   83.06%   83.84%   +0.78%     
==========================================
  Files          14       15       +1     
  Lines         248      260      +12     
==========================================
+ Hits          206      218      +12     
  Misses         42       42              
Flag Coverage Δ
docs 37.74% <0.00%> (-1.85%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mtfishman mtfishman merged commit 1a82624 into main Jun 12, 2025
21 checks passed
@mtfishman mtfishman deleted the mf/realtype branch June 12, 2025 21:04
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.

1 participant