@@ -733,20 +733,32 @@ copyto!(dest::AbstractMatrix, src::Operator) = copyto!(dest, AbstractMatrix(src)
733
733
734
734
# this is for operators that implement copy via axpy!
735
735
736
- BandedMatrix (:: Type{Zeros} , V:: Operator ) = BandedMatrix (Zeros {eltype(V)} (size (V)), bandwidths (V))
737
- Matrix (:: Type{Zeros} , V:: Operator ) = Matrix (Zeros {eltype(V)} (size (V)))
738
- BandedBlockBandedMatrix (:: Type{Zeros} , V:: Operator ) =
736
+ function BandedMatrix (:: Type{Zeros} , V:: Operator )
737
+ all (isfinite, size (V)) || throw (ArgumentError (" operator must be finite" ))
738
+ BandedMatrix (Zeros {eltype(V)} (size (V)), bandwidths (V))
739
+ end
740
+ function Matrix (:: Type{Zeros} , V:: Operator )
741
+ all (isfinite, size (V)) || throw (ArgumentError (" operator must be finite" ))
742
+ Matrix (Zeros {eltype(V)} (size (V)))
743
+ end
744
+ function BandedBlockBandedMatrix (:: Type{Zeros} , V:: Operator )
745
+ all (isfinite, size (V)) || throw (ArgumentError (" operator must be finite" ))
739
746
BandedBlockBandedMatrix (Zeros {eltype(V)} (size (V)),
740
747
blocklengths (rangespace (V)), blocklengths (domainspace (V)),
741
748
blockbandwidths (V), subblockbandwidths (V))
742
- BlockBandedMatrix (:: Type{Zeros} , V:: Operator ) =
749
+ end
750
+ function BlockBandedMatrix (:: Type{Zeros} , V:: Operator )
751
+ all (isfinite, size (V)) || throw (ArgumentError (" operator must be finite" ))
743
752
BlockBandedMatrix (Zeros {eltype(V)} (size (V)),
744
753
AbstractVector {Int} (blocklengths (rangespace (V))),
745
754
AbstractVector {Int} (blocklengths (domainspace (V))),
746
755
blockbandwidths (V))
747
- RaggedMatrix (:: Type{Zeros} , V:: Operator ) =
756
+ end
757
+ function RaggedMatrix (:: Type{Zeros} , V:: Operator )
758
+ all (isfinite, size (V)) || throw (ArgumentError (" operator must be finite" ))
748
759
RaggedMatrix (Zeros {eltype(V)} (size (V)),
749
760
Int[max (0 ,colstop (V,j)) for j= 1 : size (V,2 )])
761
+ end
750
762
751
763
752
764
convert_axpy! (:: Type{MT} , S:: Operator ) where {MT <: AbstractMatrix } =
0 commit comments