jaberg/pyll — Issue #1: bug in replace_implicit_stochastic_nodes
Author: yamins81
Created: 2012-02-17 15:26:49+00:00
State: open

In [8]: stochastic.sample(L.template, np.random)
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
/Users/dyamins/eccv12/ in ()
----> 1 stochastic.sample(L.template, np.random)

/Users/dyamins/eccv12/pyll/pyll/stochastic.pyc in sample(expr, rng)
199
200 def sample(expr, rng):
--> 201 foo, newrng = replace_implicit_stochastic_nodes(expr, as_apply(rng))
202 return rec_eval(foo)
203

/Users/dyamins/eccv12/pyll/pyll/stochastic.pyc in replace_implicit_stochastic_nodes(expr, rng, scope)
163 expr = draw
164 lrng = new_lrng
--> 165 return expr, new_lrng
166
167

UnboundLocalError: local variable 'new_lrng' referenced before assignment