Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Alt
pystencils
Commits
699144dd
Commit
699144dd
authored
Jun 26, 2021
by
Michael Kuron
Browse files
Merge branch 'RemoveWarning' into 'master'
Remove gmpy workaround See merge request
pycodegen/pystencils!255
parents
cb9cccfb
1e7a1e6f
Pipeline
#33035
failed with stage
in 23 minutes and 33 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
pystencils/__init__.py
View file @
699144dd
"""Module to generate stencil kernels in C or CUDA using sympy expressions and call them as Python functions"""
from
.
import
sympy_gmpy_bug_workaround
# NOQA
from
.
import
fd
from
.
import
stencil
as
stencil
from
.assignment
import
Assignment
,
assignment_from_stencil
...
...
pystencils/session.py
View file @
699144dd
...
...
@@ -4,6 +4,5 @@ import sympy as sp
import
pystencils
as
ps
import
pystencils.jupyter
import
pystencils.plot
as
plt
import
pystencils.sympy_gmpy_bug_workaround
__all__
=
[
'sp'
,
'np'
,
'ps'
,
'plt'
]
pystencils/sympy_gmpy_bug_workaround.py
deleted
100644 → 0
View file @
cb9cccfb
# Disable gmpy backend until this bug is resolved if joblib serialize
# See https://github.com/sympy/sympy/pull/13530
import
os
import
warnings
os
.
environ
[
'MPMATH_NOGMPY'
]
=
'1'
try
:
import
mpmath.libmp
# In case the user has imported sympy first, then pystencils
if
mpmath
.
libmp
.
BACKEND
==
'gmpy'
:
warnings
.
warn
(
"You are using the gmpy backend. You might encounter an error 'argument is not an mpz sympy'. "
"This is due to a known bug in sympy/gmpy library. "
"To prevent this, import pystencils first then sympy or set the environment variable "
"MPMATH_NOGMPY=1"
)
except
ImportError
:
pass
__all__
=
[]
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment