Skip to content
Snippets Groups Projects
Commit febd7065 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

fixed sympy 1.2 tuple

parent 57f1f5f2
No related branches found
No related tags found
1 merge request!10Resolve "Fix default parameters for the periodic bubble example"
Pipeline #9947 failed
......@@ -206,6 +206,17 @@ RUN cd /tmp \
&& cd - \
&& rm -Rf /tmp/pyFFTW
# CUDA 9.2 for ubuntu 17.10 (if nvidia gpu is present)
# This assumes an up to date driver is present on host
# while building docker file.
RUN (lspci | grep -i vga | grep -i nvidia)
&& apt-get update \
&& apt install gnupg-curl
&& dpkg --install https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64/cuda-repo-ubuntu1710_9.2.148-1_amd64.deb
&& apt-key adv --fetch-key https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64/7fa2af80.pub
&& apt-get update
&& apt-get install cuda
# ensure all libraries are known by the runtime linker
RUN ldconfig
......
......@@ -327,7 +327,8 @@ def recurse_expression_tree(op, expr):
def get_derivative_variables(expr):
"""Derivative arguments changed for sympy 1.2"""
assert isinstance(expr, sm.Derivative)
if isinstance(expr.args[1], tuple):
from sympy.core import containers
if isinstance(expr.args[1], containers.Tuple):
# sympy >= 1.2 arguments are (variable, count)
# args = [(x0,3), (x1,1)]
_vars = tuple(v[0] for v in expr.args[1:] for _ in xrange(v[1]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment