{"action":"created","issue":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1017","repository_url":"https://api.github.com/repos/pymc-devs/pymc3","labels_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1017/labels{/name}","comments_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1017/comments","events_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1017/events","html_url":"https://github.com/pymc-devs/pymc3/issues/1017","id":140432771,"number":1017,"title":"NUTS seems broken in simple uniform model","user":{"login":"robdmc","id":417837,"avatar_url":"https://avatars.githubusercontent.com/u/417837?v=3","gravatar_id":"","url":"https://api.github.com/users/robdmc","html_url":"https://github.com/robdmc","followers_url":"https://api.github.com/users/robdmc/followers","following_url":"https://api.github.com/users/robdmc/following{/other_user}","gists_url":"https://api.github.com/users/robdmc/gists{/gist_id}","starred_url":"https://api.github.com/users/robdmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robdmc/subscriptions","organizations_url":"https://api.github.com/users/robdmc/orgs","repos_url":"https://api.github.com/users/robdmc/repos","events_url":"https://api.github.com/users/robdmc/events{/privacy}","received_events_url":"https://api.github.com/users/robdmc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-03-13T00:59:44Z","updated_at":"2016-03-14T14:04:46Z","closed_at":null,"body":"Hello.\r\n\r\nI've been having a heck of a time getting Theano and pymc3 to play nicely together.  I think I made an example as simple and repeatable as I know how.\r\n\r\nI am running on a macbook air (Yosemite 10.10.5) with Python 2.7.10\r\n\r\nI have a super simple model in a file called `test_pymc3.py` that contains the following:\r\n```python\r\nimport pymc3\r\nimport sys\r\n\r\nsys.stdout.write('='*80 + '\\n')\r\nwith pymc3.Model() as model:\r\n    x = pymc3.Uniform('x', lower=-1, upper=1)\r\n    trace = pymc3.sample(500)\r\n    _ = pymc3.summary(trace)\r\n```\r\n\r\nI then install an environment and run the test file by exectuing\r\n`bash install_and_run.sh`\r\non the following bash file\r\n\r\n```bash\r\n<mac send]$ cat install_and_run.sh\r\nvirtualenv pymc3_test_env\r\n. ./pymc3_test_env/bin/activate\r\npip install --no-cache-dir -U pip\r\npip install --no-cache-dir -U git+https://github.com/pymc-devs/pymc3.git\r\npython test_pymc3.py\r\n```\r\n\r\nThe `test_pymc3.py` script returns the following output to the console.\r\n\r\n```\r\n===============================================================================\r\nApplied interval-transform to x and added transformed x_interval to model.\r\nAssigned NUTS to x_interval\r\nERROR (theano.gof.opt): SeqOptimizer apply <theano.tensor.opt.FusionOptimizer object at 0x111f99e10>\r\nERROR (theano.gof.opt): Traceback:\r\nERROR (theano.gof.opt): Traceback (most recent call last):\r\n  File \"/env/send/pymc3_test_env/lib/python2.7/site-packages/theano/gof/opt.py\", line 195, in apply\r\n    sub_prof = optimizer.optimize(fgraph)\r\n  File \"/env/send/pymc3_test_env/lib/python2.7/site-packages/theano/gof/opt.py\", line 81, in optimize\r\n    ret = self.apply(fgraph, *args, **kwargs)\r\n  File \"/env/send/pymc3_test_env/lib/python2.7/site-packages/theano/tensor/opt.py\", line 5498, in apply\r\n    new_outputs = self.optimizer(node)\r\n  File \"/env/send/pymc3_test_env/lib/python2.7/site-packages/theano/tensor/opt.py\", line 5433, in local_fuse\r\n    n = OP(C)(*inputs).owner\r\n  File \"/env/send/pymc3_test_env/lib/python2.7/site-packages/theano/tensor/elemwise.py\", line 496, in __init__\r\n    scalar_op.nout)\r\nValueError: Cannot construct a ufunc with more than 32 operands (requested number were: inputs = 34 and outputs = 1)\r\n\r\n[-----------------100%-----------------] 500 of 500 complete in 0.2 sec\r\n\r\nx_interval:\r\n\r\n  Mean             SD               MC Error         95% HPD interval\r\n  -------------------------------------------------------------------\r\n\r\n  -0.128           2.175            0.129            [-5.100, 3.946]\r\n\r\n  Posterior quantiles:\r\n  2.5            25             50             75             97.5\r\n  |--------------|==============|==============|--------------|\r\n\r\n  -5.060         -1.248         -0.016         1.128          4.179\r\n\r\n\r\nx:\r\n\r\n  Mean             SD               MC Error         95% HPD interval\r\n  -------------------------------------------------------------------\r\n\r\n  -0.007           0.607            0.036            [-1.000, 0.907]\r\n\r\n  Posterior quantiles:\r\n  2.5            25             50             75             97.5\r\n  |--------------|==============|==============|--------------|\r\n\r\n  -0.987         -0.554         -0.008         0.511          0.970\r\n\r\n(pymc3_test_env)<mac send]$\r\n```\r\n\r\nI even completely removed the `~/.theano` directory with the thought that some weird caching thing was happening, but no dice.  As far as I can tell, the distrubtion doesn't look wrong, but the `ValueError` makes me not trust it.  Any help you could provide would be greatly appreciated.\r\n\r\nOh... incidentally.  If I cange the modeled variable to be\r\n```python\r\nx = pymc3.Uniform('x', lower=-1, upper=1, shape=5)\r\n```\r\neverything works fine.\r\n\r\nOne final note.  Here is the value of `pip freeze` on the env\r\n```\r\n(pymc3_test_env)<mac send]$ pip freeze\r\ncycler==0.10.0\r\nenum34==1.1.2\r\njoblib==0.9.4\r\nmatplotlib==1.5.1\r\nnumpy==1.10.4\r\npandas==0.18.0\r\npatsy==0.4.1\r\npymc3==3.0\r\npyparsing==2.1.0\r\npython-dateutil==2.5.0\r\npytz==2015.7\r\nscipy==0.17.0\r\nsix==1.10.0\r\nTheano==0.7.0\r\n```"},"comment":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/comments/196322241","html_url":"https://github.com/pymc-devs/pymc3/issues/1017#issuecomment-196322241","issue_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1017","id":196322241,"user":{"login":"twiecki","id":674200,"avatar_url":"https://avatars.githubusercontent.com/u/674200?v=3","gravatar_id":"","url":"https://api.github.com/users/twiecki","html_url":"https://github.com/twiecki","followers_url":"https://api.github.com/users/twiecki/followers","following_url":"https://api.github.com/users/twiecki/following{/other_user}","gists_url":"https://api.github.com/users/twiecki/gists{/gist_id}","starred_url":"https://api.github.com/users/twiecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twiecki/subscriptions","organizations_url":"https://api.github.com/users/twiecki/orgs","repos_url":"https://api.github.com/users/twiecki/repos","events_url":"https://api.github.com/users/twiecki/events{/privacy}","received_events_url":"https://api.github.com/users/twiecki/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T14:04:46Z","updated_at":"2016-03-14T14:04:46Z","body":"CC @jsalvatier "}}