Skip to content

Commit 7d4da4b

Browse files
authored
Fix check in tensor_product_axis for one-based axes
1 parent b22523b commit 7d4da4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/BlockSparseArraysTensorAlgebraExt/BlockSparseArraysTensorAlgebraExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using TensorAlgebra: TensorAlgebra, BlockReshapeFusion, BlockedTuple, matricize,
1010
function TensorAlgebra.tensor_product_axis(
1111
::BlockReshapeFusion, r1::BlockUnitRange, r2::BlockUnitRange
1212
)
13-
isone(first(r1)) || isone(first(r2)) ||
13+
(isone(first(r1)) && isone(first(r2))) ||
1414
throw(ArgumentError("Only one-based axes are supported"))
1515
blockaxpairs = Iterators.product(eachblockaxes1(r1), eachblockaxes1(r2))
1616
blockaxs = vec(splat(tensor_product_axis).(blockaxpairs))

0 commit comments

Comments
 (0)