Commit 0238f763 authored by Markus Holzer's avatar Markus Holzer
Browse files

fixed sympy import numbers warning

parent e685321c
......@@ -13,6 +13,7 @@ tests-and-coverage:
- $ENABLE_NIGHTLY_BUILDS
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
script:
- pip list
- export NUM_CORES=$(nproc --all)
- mkdir -p ~/.config/matplotlib
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc
......
......@@ -7,6 +7,7 @@ from typing import Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Ty
import sympy as sp
from sympy.functions import Abs
from sympy.core.numbers import Zero
from pystencils.assignment import Assignment
from pystencils.data_types import cast_func, get_base_type, get_type_of_expression
......@@ -260,8 +261,8 @@ def subs_additive(expr: sp.Expr, replacement: sp.Expr, subexpression: sp.Expr,
if not param_list:
return current_expr
else:
if current_expr.func == sp.Mul and sp.numbers.Zero() in param_list:
return sp.numbers.Zero()
if current_expr.func == sp.Mul and Zero() in param_list:
return Zero()
else:
return current_expr.func(*param_list, evaluate=False)
......
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