From c1cf56b4d67a447228101a2d7d2da6bb86d02dbc Mon Sep 17 00:00:00 2001 From: mtfishman Date: Tue, 11 Mar 2025 20:43:53 -0400 Subject: [PATCH] [WIP] Define `zeros` for graded unit ranges --- .../BlockSparseArraysGradedUnitRangesExt.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/BlockSparseArraysGradedUnitRangesExt/BlockSparseArraysGradedUnitRangesExt.jl b/ext/BlockSparseArraysGradedUnitRangesExt/BlockSparseArraysGradedUnitRangesExt.jl index 49762ed..92315f4 100644 --- a/ext/BlockSparseArraysGradedUnitRangesExt/BlockSparseArraysGradedUnitRangesExt.jl +++ b/ext/BlockSparseArraysGradedUnitRangesExt/BlockSparseArraysGradedUnitRangesExt.jl @@ -102,4 +102,10 @@ function Base.getindex( return getindex_blocksparse(a, I1, I2) end +function Base.zeros( + elt::Type, ax::Tuple{AbstractGradedUnitRange,Vararg{AbstractGradedUnitRange}} +) + return BlockSparseArray{elt}(undef, ax) +end + end