@@ -134,52 +134,4 @@ function GradedUnitRanges.blocklabels(a::BlockSparseVector)
134134 end
135135end
136136
137- # This is a temporary fix for `show` being broken for BlockSparseArrays
138- # with mixed dual and non-dual axes. This shouldn't be needed once
139- # GradedUnitRanges is rewritten using BlockArrays v1.
140- # TODO : Delete this once GradedUnitRanges is rewritten.
141- @interface :: AbstractBlockSparseArrayInterface function Base. show (
142- io:: IO , mime:: MIME"text/plain" , a:: AbstractArray , axes_a:: Tuple ; kwargs...
143- )
144- println (io, " typeof(axes) = " , typeof (axes_a), " \n " )
145- println (
146- io,
147- " Warning: To temporarily circumvent a bug in printing BlockSparseArrays with mixtures of dual and non-dual axes, the types of the dual axes printed below might not be accurate. The types printed above this message are the correct ones.\n " ,
148- )
149- return invoke (show, Tuple{IO,MIME " text/plain" ,AbstractArray}, io, mime, a; kwargs... )
150- end
151-
152- # This is a temporary fix for `show` being broken for BlockSparseArrays
153- # with mixed dual and non-dual axes. This shouldn't be needed once
154- # GradedUnitRanges is rewritten using BlockArrays v1.
155- # TODO : Delete this once GradedUnitRanges is rewritten.
156- function Base. show (io:: IO , mime:: MIME"text/plain" , a:: BlockSparseArray ; kwargs... )
157- axes_a = axes (a)
158- a_nondual = BlockSparseArray (blocks (a), nondual .(axes (a)))
159- return @interface BlockSparseArrayInterface () show (io, mime, a_nondual, axes_a; kwargs... )
160- end
161-
162- # This is a temporary fix for `show` being broken for BlockSparseArrays
163- # with mixed dual and non-dual axes. This shouldn't be needed once
164- # GradedUnitRanges is rewritten using BlockArrays v1.
165- # TODO : Delete this once GradedUnitRanges is rewritten.
166- function Base. show (
167- io:: IO , mime:: MIME"text/plain" , a:: Adjoint{<:Any,<:BlockSparseMatrix} ; kwargs...
168- )
169- axes_a = axes (a)
170- a_nondual = BlockSparseArray (blocks (a' ), dual .(nondual .(axes (a' ))))'
171- return @interface BlockSparseArrayInterface () show (io, mime, a_nondual, axes_a; kwargs... )
172- end
173-
174- # This is a temporary fix for `show` being broken for BlockSparseArrays
175- # with mixed dual and non-dual axes. This shouldn't be needed once
176- # GradedUnitRanges is rewritten using BlockArrays v1.
177- # TODO : Delete this once GradedUnitRanges is rewritten.
178- function Base. show (
179- io:: IO , mime:: MIME"text/plain" , a:: Transpose{<:Any,<:BlockSparseMatrix} ; kwargs...
180- )
181- axes_a = axes (a)
182- a_nondual = tranpose (BlockSparseArray (transpose (blocks (a)), nondual .(axes (a))))
183- return @interface BlockSparseArrayInterface () show (io, mime, a_nondual, axes_a; kwargs... )
184- end
185137end
0 commit comments