@@ -258,20 +258,26 @@ function constant_algebra_element(::Type{<:SubBasis{B,M}}, α) where {B,M}
258258    )
259259end 
260260
261- function  _show (io:: IO , mime:: MIME , basis:: SubBasis{B} ) where  {B}
262-     print (io, " SubBasis{$(nameof (B)) }" 
263-     print (io, " ([" 
261+ #  TODO  use Base.show_vector here, maybe by wrapping the `generator` vector
262+ #       into something that spits objects wrapped with the `mime` type
263+ function  _show_vector (io:: IO , mime:: MIME , v)
264+     print (io, ' [' 
264265    first =  true 
265-     #  TODO  use Base.show_vector here, maybe by wrapping the `generator` vector
266-     #       into something that spits objects wrapped with the `mime` type
267-     for  mono in  basis. monomials
266+     for  el in  v
268267        if  ! first
269268            print (io, " , " 
270269        end 
271270        first =  false 
272-         show (io, mime, mono )
271+         show (io, mime, el )
273272    end 
274-     return  print (io, " ])" 
273+     print (io, ' ]' 
274+ end 
275+ 
276+ function  _show (io:: IO , mime:: MIME , basis:: SubBasis{B} ) where  {B}
277+     print (io, " SubBasis{$(nameof (B)) }(" 
278+     _show_vector (io, mime, basis. monomials)
279+     print (io, ' )' 
280+     return 
275281end 
276282
277283function  Base. show (io:: IO , mime:: MIME"text/plain" , basis:: SubBasis )
@@ -449,7 +455,7 @@ function SA.coeffs(
449455        return  SA. SparseCoefficients (_vec (source. monomials), _vec (cfs))
450456    else 
451457        res =  SA. zero_coeffs (
452-             _promote_coef (_promote_coef (valtype (cfs), B1), B2),
458+             _promote_coef (_promote_coef (SA . value_type (cfs), B1), B2),
453459            target,
454460        )
455461        return  SA. coeffs! (res, cfs, source, target)
0 commit comments