diff --git a/conda-envs/environment-dev-py37.yml b/conda-envs/environment-dev-py37.yml index 9b07b0f4af..5823d96f5b 100644 --- a/conda-envs/environment-dev-py37.yml +++ b/conda-envs/environment-dev-py37.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle @@ -13,7 +13,7 @@ dependencies: - h5py>=2.7 - ipython - myst-nb -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15 - numpydoc>=0.9 - pandas>=0.24 - pre-commit>=2.8.0 diff --git a/conda-envs/environment-dev-py38.yml b/conda-envs/environment-dev-py38.yml index 17c3f42869..810329c8a6 100644 --- a/conda-envs/environment-dev-py38.yml +++ b/conda-envs/environment-dev-py38.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle @@ -13,7 +13,7 @@ dependencies: - h5py>=2.7 - ipython - myst-nb -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - numpydoc>=0.9 - pandas>=0.24.0 - pre-commit>=2.8.0 diff --git a/conda-envs/environment-dev-py39.yml b/conda-envs/environment-dev-py39.yml index cbdc89390a..238d1bfb51 100644 --- a/conda-envs/environment-dev-py39.yml +++ b/conda-envs/environment-dev-py39.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle @@ -13,7 +13,7 @@ dependencies: - h5py>=2.7 - ipython - myst-nb -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - numpydoc>=0.9 - pandas - pre-commit>=2.8.0 diff --git a/conda-envs/environment-test-py37.yml b/conda-envs/environment-test-py37.yml index c6d00d2cb4..a0a484e7eb 100644 --- a/conda-envs/environment-test-py37.yml +++ b/conda-envs/environment-test-py37.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle @@ -14,7 +14,7 @@ dependencies: - ipython - libblas=*=*mkl - mkl-service -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - pandas>=0.24 - pre-commit>=2.8.0 - pytest-cov>=2.5 diff --git a/conda-envs/environment-test-py38.yml b/conda-envs/environment-test-py38.yml index cf31960ccc..d10434332b 100644 --- a/conda-envs/environment-test-py38.yml +++ b/conda-envs/environment-test-py38.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle @@ -14,7 +14,7 @@ dependencies: - ipython - libblas=*=*mkl - mkl-service -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - pandas - pre-commit>=2.8.0 - pytest-cov>=2.5 diff --git a/conda-envs/environment-test-py39.yml b/conda-envs/environment-test-py39.yml index 2461a44841..3300d80ea5 100644 --- a/conda-envs/environment-test-py39.yml +++ b/conda-envs/environment-test-py39.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools - cloudpickle @@ -14,7 +14,7 @@ dependencies: - ipython>=7.16 - libblas=*=*mkl - mkl-service -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - pandas - pre-commit>=2.8.0 - pytest-cov>=2.5 diff --git a/conda-envs/windows-environment-dev-py38.yml b/conda-envs/windows-environment-dev-py38.yml index e7f3786b38..91fc742370 100644 --- a/conda-envs/windows-environment-dev-py38.yml +++ b/conda-envs/windows-environment-dev-py38.yml @@ -5,13 +5,13 @@ channels: dependencies: # base dependencies (see install guide for Windows) - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.4 - cachetools>=4.2.1 - cloudpickle - fastprogress>=0.2.0 - h5py -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - pandas - pip - python=3.8 diff --git a/conda-envs/windows-environment-test-py38.yml b/conda-envs/windows-environment-test-py38.yml index d5c6d7756c..41e377d51e 100644 --- a/conda-envs/windows-environment-test-py38.yml +++ b/conda-envs/windows-environment-test-py38.yml @@ -5,7 +5,7 @@ channels: dependencies: # base dependencies (see install guide for Windows) - aeppl=0.0.18 -- aesara=2.3.2 +- aesara=2.3.6 - arviz>=0.11.2 - cachetools - cloudpickle @@ -15,7 +15,7 @@ dependencies: - mkl==2020.4 - mkl-service==2.3.0 - m2w64-toolchain -- numpy>=1.15.0,<1.22.0 +- numpy>=1.15.0 - pandas - pip - python=3.8 diff --git a/pymc/distributions/multivariate.py b/pymc/distributions/multivariate.py index f0f031ff02..20fc67bd91 100644 --- a/pymc/distributions/multivariate.py +++ b/pymc/distributions/multivariate.py @@ -1742,7 +1742,7 @@ def dist( dist_shape = (rowchol_cov.shape[0], colchol_cov.shape[0]) # Broadcasting mu - mu = at.extra_ops.broadcast_to(a=mu, shape=dist_shape) + mu = at.extra_ops.broadcast_to(mu, shape=dist_shape) mu = at.as_tensor_variable(floatX(mu)) # mean = median = mode = mu diff --git a/pymc/ode/ode.py b/pymc/ode/ode.py index 63a265e9cd..14698e50a1 100644 --- a/pymc/ode/ode.py +++ b/pymc/ode/ode.py @@ -158,7 +158,7 @@ def __call__(self, y0, theta, return_sens=False, **kwargs): theta = at.cast(at.unbroadcast(at.as_tensor_variable(theta), 0), floatX) inputs = [y0, theta] for i, (input_val, itype) in enumerate(zip(inputs, self._itypes)): - if not input_val.type == itype: + if not input_val.type.in_same_class(itype): raise ValueError( f"Input {i} of type {input_val.type} does not have the expected type of {itype}" ) diff --git a/pymc/tests/test_smc.py b/pymc/tests/test_smc.py index 21cec4acd6..ce8070a5ac 100644 --- a/pymc/tests/test_smc.py +++ b/pymc/tests/test_smc.py @@ -140,20 +140,13 @@ def test_marginal_likelihood(self): with pm.Model() as model: a = pm.Beta("a", alpha, beta) y = pm.Bernoulli("y", a, observed=data) - trace = pm.sample_smc(2000, return_inferencedata=False) - marginals.append(trace.report.log_marginal_likelihood) + trace = pm.sample_smc(2000, chains=2, return_inferencedata=False) + # log_marignal_likelihood is found in the last value of each chain + lml = np.mean([chain[-1] for chain in trace.report.log_marginal_likelihood]) + marginals.append(lml) # compare to the analytical result - assert ( - np.abs( - np.exp( - np.nanmean(np.array(marginals[1], dtype=float)) - - np.nanmean(np.array(marginals[0], dtype=float)) - - 4.0 - ) - ) - <= 1 - ) + assert abs(np.exp(marginals[1] - marginals[0]) - 4.0) <= 1 def test_start(self): with pm.Model() as model: diff --git a/requirements-dev.txt b/requirements-dev.txt index 8582d96bd1..f1fb2e716a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ # See that file for comments about the need/usage of each dependency. aeppl==0.0.18 -aesara==2.3.2 +aesara==2.3.6 arviz>=0.11.4 cachetools>=4.2.1 cloudpickle @@ -10,7 +10,7 @@ fastprogress>=0.2.0 h5py>=2.7 ipython myst-nb -numpy>=1.15.0,<1.22.0 +numpy>=1.15.0 numpydoc>=0.9 pandas pre-commit>=2.8.0 diff --git a/requirements.txt b/requirements.txt index ea2e4deadd..6027a8f6f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ aeppl==0.0.18 -aesara==2.3.2 +aesara==2.3.6 arviz>=0.11.4 cachetools>=4.2.1 cloudpickle fastprogress>=0.2.0 -numpy>=1.15.0,<1.22.0 +numpy>=1.15.0 pandas>=0.24.0 scipy>=1.4.1 typing-extensions>=3.7.4