Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 17, 2024
1 parent 3345a17 commit bc3ce76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions src/MultivariateBases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ function algebra(
return Algebra{typeof(basis),B,M}(basis)
end

# Needed ?
#function MA.promote_operation(
# ::typeof(algebra),
# BT::Type{
# <:Union{QuotientBasis{Polynomial{B,M}},FullBasis{B,M},SubBasis{B,M}},
# },
#) where {B,M}
# return Algebra{BT,B,M}
#end
function MA.promote_operation(
::typeof(algebra),
BT::Type{
<:Union{QuotientBasis{Polynomial{B,M}},FullBasis{B,M},SubBasis{B,M}},
},
) where {B,M}
return Algebra{BT,B,M}
end

end # module
2 changes: 1 addition & 1 deletion test/quotient.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end
coeffs = [3, -2, 1]
@test coefficients(p, basis) == coeffs
a = MB.algebra_element(p)
@test StarAlgebras.coeffs(a, basis) == coeffs
@test SA.coeffs(a, basis) == coeffs
explicit = MB.explicit_basis(a)
exp = MB.algebra_element(SA.coeffs(a, explicit), explicit)
@test SA.coeffs(exp, basis) == coeffs
Expand Down

0 comments on commit bc3ce76

Please sign in to comment.