diff --git a/Project.toml b/Project.toml index feb52e0..2207a08 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TensorAlgebra" uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" authors = ["ITensor developers and contributors"] -version = "0.6.0" +version = "0.6.1" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" diff --git a/src/blockarrays.jl b/src/blockarrays.jl index 0b8dbc2..056fcac 100644 --- a/src/blockarrays.jl +++ b/src/blockarrays.jl @@ -13,7 +13,7 @@ end function tensor_product_axis( ::BlockReshapeFusion, r1::AbstractUnitRange, r2::AbstractUnitRange ) - isone(first(r1)) || isone(first(r2)) || + (isone(first(r1)) && isone(first(r2))) || throw(ArgumentError("Only one-based axes are supported")) blockaxpairs = Iterators.product(eachblockaxes1(r1), eachblockaxes1(r2)) blockaxs = vec(map(splat(tensor_product_axis), blockaxpairs)) diff --git a/src/matricize.jl b/src/matricize.jl index e532300..200af43 100644 --- a/src/matricize.jl +++ b/src/matricize.jl @@ -259,7 +259,7 @@ struct ReshapeFusion <: FusionStyle end FusionStyle(::Type{<:AbstractArray}) = ReshapeFusion() trivial_axis(::ReshapeFusion, a::AbstractArray) = Base.OneTo(1) function tensor_product_axis(::ReshapeFusion, r1::AbstractUnitRange, r2::AbstractUnitRange) - isone(first(r1)) || isone(first(r2)) || + (isone(first(r1)) && isone(first(r2))) || throw(ArgumentError("Only one-based axes are supported")) return Base.OneTo(length(r1) * length(r2)) end