Skip to content
Snippets Groups Projects
Commit 25107061 authored by Rafal Skolasinski's avatar Rafal Skolasinski
Browse files

remove not important test from "kwant.continuum": legacy_monomials

parent 96f990bd
No related branches found
No related tags found
No related merge requests found
......@@ -135,24 +135,6 @@ def test_monomials():
monomials(f(a), gens='a')
def legacy_monomials(expr, *gens):
"""This was my first implementation. Unfortunately it is very slow.
It is used to test correctness of new monomials function.
"""
expr = make_commutative(expr, x)
R = sympy.ring(gens, sympy.EX, sympy.lex)[0]
expr = R(expr)
output = {}
for power, coeff in zip(expr.monoms(), expr.coeffs()):
key = reduce(mul, [sympy.Symbol(k.name)**n for k, n in zip(gens, power)])
output[key] = sympy.expand(coeff.as_expr())
return output
def test_monomials_with_reference_function():
assert legacy_monomials(expr2, x) == monomials(expr2, gens=[x])
def test_matrix_monomials():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment