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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
83c93124
Commit
83c93124
authored
Feb 9, 2022
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Delete sympy simplification test
parent
6be5b89f
No related branches found
No related tags found
1 merge request
!275
WIP: Revamp the type system
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils_tests/test_astnodes.py
+0
-24
0 additions, 24 deletions
pystencils_tests/test_astnodes.py
with
0 additions
and
24 deletions
pystencils_tests/test_astnodes.py
+
0
−
24
View file @
83c93124
...
...
@@ -86,27 +86,3 @@ def test_loop_over_coordinate():
assert
loop
.
stop
==
20
assert
loop
.
step
==
2
@pytest.mark.parametrize
(
'
default_assignment_simplifications
'
,
[
False
,
True
])
@pytest.mark.skipif
(
python_version
==
'
3.8.2
'
,
reason
=
"
For this python version a strange bug in mpmath occurs
"
)
def
test_sympy_assignment
(
default_assignment_simplifications
):
assignment
=
SympyAssignment
(
dst
[
0
,
0
](
0
),
sp
.
log
(
x
+
3
)
/
sp
.
log
(
2
)
+
sp
.
log
(
x
**
2
+
1
))
config
=
pystencils
.
config
.
CreateKernelConfig
(
default_assignment_simplifications
=
default_assignment_simplifications
)
ast
=
ps
.
create_kernel
([
assignment
],
config
=
config
)
code
=
ps
.
get_code_str
(
ast
)
if
default_assignment_simplifications
:
assert
'
log1p
'
in
code
# constant term is directly evaluated
assert
'
log2
'
not
in
code
else
:
# no optimisations will be applied so the optimised version of log will not be in the code
assert
'
log1p
'
not
in
code
assert
'
log2
'
not
in
code
assignment
.
replace
(
assignment
.
lhs
,
dst
[
0
,
0
](
1
))
assignment
.
replace
(
assignment
.
rhs
,
sp
.
log
(
2
))
assert
assignment
.
lhs
==
dst
[
0
,
0
](
1
)
assert
assignment
.
rhs
==
sp
.
log
(
2
)
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
sign in
to comment