Commit 3f28fa21 authored by Taddeus Kroes's avatar Taddeus Kroes

Code cleanup.

parent 19282d20
from itertools import combinations
from .utils import greatest_common_divisor
from .utils import greatest_common_divisor, is_numeric_node
from ..node import ExpressionLeaf as Leaf, Scope, OP_ADD, OP_DIV, OP_MUL, \
OP_POW
from ..possibilities import Possibility as P, MESSAGES
......@@ -195,7 +195,7 @@ def match_multiply_numerics(node):
p = []
scope = Scope(node)
numerics = filter(lambda n: n.is_numeric(), scope)
numerics = filter(is_numeric_node, scope)
for n in numerics:
if n.negated:
......
from src.rules.derivatives import der, get_derivation_variable, \
from src.rules.derivatives import get_derivation_variable, \
match_zero_derivative, match_one_derivative, one_derivative, \
zero_derivative, match_variable_power, variable_root, \
variable_exponent, match_const_deriv_multiplication, \
......@@ -6,7 +6,7 @@ from src.rules.derivatives import der, get_derivation_variable, \
logarithmic, match_goniometric, sinus, cosinus, tangens, \
match_sum_product_rule, sum_rule, product_rule, match_quotient_rule, \
quotient_rule, power_rule
from src.node import Scope, sin, cos, ln
from src.node import Scope, sin, cos, ln, der
from src.possibilities import Possibility as P
from tests.rulestestcase import RulesTestCase, tree
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment