You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -178,7 +178,7 @@ Returns an iterator over the coefficients of the monomials of `X` in `p` where `
178
178
Calling `coefficients` on ``4x^2y + xy + 2x`` should return an iterator of ``[4, 1, 2]``.
179
179
Calling `coefficients(4x^2*y + x*y + 2x + 3, [x, 1, x*y, y])` should return an iterator of ``[2, 3, 1, 0]``.
180
180
"""
181
-
coefficients(p::APL) =coefficient.(terms(p))
181
+
coefficients(p::APL{T}) where {T} =LazyMap{T}(coefficient, terms(p))
182
182
functioncoefficients(p::APL{T}, X::AbstractVector) where T
183
183
σ, mv =sortmonovec(X)
184
184
@assertlength(mv) ==length(X) # no duplicate in X
@@ -214,6 +214,7 @@ Calling `monomials` on ``4x^2y + xy + 2x`` should return an iterator of ``[x^2y,
214
214
Calling `monomials((x, y), [1, 3], m -> degree(m, y) != 1)` should return `[x^3, x*y^2, y^3, x]` where `x^2*y` and `y` have been excluded by the filter.
0 commit comments