From c4a0b40a3a4901ba7fdc41520a6a688099337818 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 26 Nov 2020 09:24:34 -0700 Subject: [PATCH] Add -theano-pymc patch to adapt. --- sympy-theano-pymc.patch | 22 ++++++++++++++++++++++ sympy.spec | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 sympy-theano-pymc.patch diff --git a/sympy-theano-pymc.patch b/sympy-theano-pymc.patch new file mode 100644 index 0000000..0741612 --- /dev/null +++ b/sympy-theano-pymc.patch @@ -0,0 +1,22 @@ +--- sympy-sympy-1.6.2/sympy/printing/tests/test_theanocode.py.orig 2020-08-07 09:17:07.000000000 -0600 ++++ sympy-sympy-1.6.2/sympy/printing/tests/test_theanocode.py 2020-11-26 07:36:24.900389599 -0700 +@@ -350,7 +350,7 @@ def test_theano_function_scalar(): + f = theano_function_(inputs, outputs, dims=in_dims, scalar=scalar) + + # Check the theano_function attribute is set whether wrapped or not +- assert isinstance(f.theano_function, theano.compile.function_module.Function) ++ assert isinstance(f.theano_function, theano.compile.function.types.Function) + + # Feed in inputs of the appropriate size and get outputs + in_values = [ +--- sympy-sympy-1.6.2/sympy/printing/theanocode.py.orig 2020-08-07 09:17:07.000000000 -0600 ++++ sympy-sympy-1.6.2/sympy/printing/theanocode.py 2020-11-26 07:35:55.667441366 -0700 +@@ -442,7 +442,7 @@ def theano_function(inputs, outputs, sca + function will return a list of arrays. See description of the ``squeeze`` + argument above for the behavior when a single output is passed in a list. + The returned object will either be an instance of +- ``theano.compile.function_module.Function`` or a Python wrapper ++ ``theano.compile.function.types.Function`` or a Python wrapper + function around one. In both cases, the returned value will have a + ``theano_function`` attribute which points to the return value of + ``theano.function``. diff --git a/sympy.spec b/sympy.spec index d975150..81e52dd 100644 --- a/sympy.spec +++ b/sympy.spec @@ -9,6 +9,8 @@ Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.ta Patch0: %{name}-float.patch # Default to python3 in the Cython backend Patch1: %{name}-python3.patch +# Adapt to Theano-PyMC +Patch2: %{name}-theano-pymc.patch BuildArch: noarch @@ -177,6 +179,7 @@ fi %changelog * Thu Nov 26 2020 Jerry James - 1.6.2-2 - Update Theano dependency for Theano-PyMC +- Add -theano-pymc patch to adapt * Mon Aug 10 2020 Jerry James - 1.6.2-1 - Version 1.6.2