Skip to content

Fix broadcasts, Int32-index and eltype conversion, scalar constructors; constructor docs - #164

Merged
ViralBShah merged 4 commits into
v11from
vs/small-issue-fixes
Oct 27, 2026
Merged

ViralBShah merged 4 commits into
v11from
vs/small-issue-fixes

Conversation

@ViralBShah

Copy link
Copy Markdown
Member

Small fixes from triaging the open issues. Fixes #124, fixes #144, fixes #101.

  • UndefVarError in Base.copyto! #124 C .= A .op B: in both the matrix and vector copyto!, f was set only for ^, so other operators threw UndefVarError: `f` , and the scalar fallback called apply!(C, f, ...) instead of apply!(f, C, ...).
  • Support for SparseMatrixCSC{Float64, Int32} #144 non-Int64 indices: GBMatrix/GBVector from a SparseMatrixCSC/SparseVector with Int32 indices handed GraphBLAS 32-bit index arrays to read as 64-bit. Indices are now widened when copying. unsafepack! can't share such arrays, so it throws an ArgumentError instead.
  • Eltype conversion: GBMatrix{Float32}(S) / GBVector{Float32}(v) for a Float64 sparse input threw a MethodError (already broken on v11). Values are now converted to the target eltype.
  • Scalar constructors: GBVector(I, x, n) referenced an undefined J, and GBVector((3,), 1.0) / GBMatrix((2,2), 1.0) passed fill positionally.
  • Constructors not shown in GBMatrix docstring #101 docs: the GBMatrix/GBVector/GBMatrixC/R docstrings get a proper # Constructors section listing the forms that actually exist. Docstrings are added for getfill, gbget and gbrandn, which are now on the Utilities page.

Each fix has a small test in an existing testset. Pkg.test() is running on nightly; CI will confirm.

🤖 Generated with Claude Code

ViralBShah and others added 4 commits October 27, 2026 17:09
f was only set for ^, so other operators threw UndefVarError, and the
scalar fallback passed apply! its arguments in the wrong order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GBMatrix/GBVector from a SparseMatrixCSC or SparseVector widen narrower
index types and convert values to the target eltype. unsafepack! on such
inputs now throws instead of handing GraphBLAS 32-bit indices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GBMatrix/GBVector docstrings: list constructors from dims, dense arrays,
  SparseMatrixCSC/SparseVector, and COO with `fill`/`combine`. The scalar
  (iso) COO forms take no `combine`.
- Add docstrings for getfill, gbget, gbrandn and list them on the
  Utilities page; fix the gbset option list rendering.

Fixes #101, fixes #103.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GBVector(I, x, n) referenced an undefined J, and the dims-plus-scalar
constructors passed fill positionally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.18%. Comparing base (2fe30ea) to head (8c6d7ee).

Files with missing lines Patch % Lines
src/pack.jl 50.00% 2 Missing ⚠️
src/operations/broadcasts.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              v11     #164      +/-   ##
==========================================
+ Coverage   66.10%   67.18%   +1.07%     
==========================================
  Files          54       54              
  Lines        4449     4458       +9     
==========================================
+ Hits         2941     2995      +54     
+ Misses       1508     1463      -45     

☔ View full report in Codecov by Harness.
📢 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.

@ViralBShah
ViralBShah merged commit a98af85 into v11 Oct 27, 2026
7 checks passed
@ViralBShah
ViralBShah deleted the vs/small-issue-fixes branch October 27, 2026 17:18
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.

Support for SparseMatrixCSC{Float64, Int32} UndefVarError in Base.copyto! Constructors not shown in GBMatrix docstring

1 participant