Skip to content

Commit 62ce15b

Browse files
committed
assert spacetype
1 parent d6e5a7a commit 62ce15b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/factorizations/truncation.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,12 @@ MAK.findtruncated_svd(values::SectorVector, strategy::TruncationByError) =
259259
MAK.findtruncated(values, strategy)
260260

261261
function MAK.findtruncated(values::SectorVector, strategy::TruncationSpace)
262+
@assert spacetype(values) == spacetype(strategy)
262263
blockstrategy(c) = truncrank(dim(strategy.space, c); strategy.by, strategy.rev)
263264
return SectorDict(c => MAK.findtruncated(d, blockstrategy(c)) for (c, d) in pairs(values))
264265
end
265266
function MAK.findtruncated_svd(values::SectorVector, strategy::TruncationSpace)
267+
@assert spacetype(values) == spacetype(strategy)
266268
blockstrategy(c) = truncrank(dim(strategy.space, c); strategy.by, strategy.rev)
267269
return SectorDict(c => MAK.findtruncated_svd(d, blockstrategy(c)) for (c, d) in pairs(values))
268270
end

0 commit comments

Comments
 (0)