Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Bindgen
pystencils
Commits
0238f763
Commit
0238f763
authored
5 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
fixed sympy import numbers warning
parent
e685321c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
pystencils/sympyextensions.py
+3
-2
3 additions, 2 deletions
pystencils/sympyextensions.py
with
4 additions
and
2 deletions
.gitlab-ci.yml
+
1
−
0
View file @
0238f763
...
@@ -13,6 +13,7 @@ tests-and-coverage:
...
@@ -13,6 +13,7 @@ tests-and-coverage:
-
$ENABLE_NIGHTLY_BUILDS
-
$ENABLE_NIGHTLY_BUILDS
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/full
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/full
script
:
script
:
-
pip list
-
export NUM_CORES=$(nproc --all)
-
export NUM_CORES=$(nproc --all)
-
mkdir -p ~/.config/matplotlib
-
mkdir -p ~/.config/matplotlib
-
echo "backend:template" > ~/.config/matplotlib/matplotlibrc
-
echo "backend:template" > ~/.config/matplotlib/matplotlibrc
...
...
This diff is collapsed.
Click to expand it.
pystencils/sympyextensions.py
+
3
−
2
View file @
0238f763
...
@@ -7,6 +7,7 @@ from typing import Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Ty
...
@@ -7,6 +7,7 @@ from typing import Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Ty
import
sympy
as
sp
import
sympy
as
sp
from
sympy.functions
import
Abs
from
sympy.functions
import
Abs
from
sympy.core.numbers
import
Zero
from
pystencils.assignment
import
Assignment
from
pystencils.assignment
import
Assignment
from
pystencils.data_types
import
cast_func
,
get_base_type
,
get_type_of_expression
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,
...
@@ -260,8 +261,8 @@ def subs_additive(expr: sp.Expr, replacement: sp.Expr, subexpression: sp.Expr,
if
not
param_list
:
if
not
param_list
:
return
current_expr
return
current_expr
else
:
else
:
if
current_expr
.
func
==
sp
.
Mul
and
sp
.
numbers
.
Zero
()
in
param_list
:
if
current_expr
.
func
==
sp
.
Mul
and
Zero
()
in
param_list
:
return
sp
.
numbers
.
Zero
()
return
Zero
()
else
:
else
:
return
current_expr
.
func
(
*
param_list
,
evaluate
=
False
)
return
current_expr
.
func
(
*
param_list
,
evaluate
=
False
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment