title: Pymc3 python function to deterministic
body: <p>In <a href="https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/master/Chapter1_Introduction/Ch1_Introduction_PyMC2.ipynb" rel="nofollow noreferrer">this notebook</a> from Bayesian Methods for Hackers, they create a Deterministic variable from a python function as such:</p>
  
  <pre><code># from code line 9 in the notebook
  @pm.deterministic
  def lambda_(tau=tau, lambda_1=lambda_1, lambda_2=lambda_2):
      out = np.zeros(n_count_data)
      out[:tau] = lambda_1  # lambda before tau is lambda1
      out[tau:] = lambda_2  # lambda after (and including) tau is lambda2
      return out
  </code></pre>
  
  <p>I'm trying to recreate this experiment almost exactly, but apparently <code>@pm.deterministic</code> is not a thing in pymc3. Any idea how I would do this in pymc3?</p>