Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98778
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-11-13 15:04 -0800 |
| Message-ID | <b4254670-28c9-4e2c-a221-a27c0d6f62e9@googlegroups.com> (permalink) |
| Subject | What is '@' for |
| From | fl <rxjwg98@gmail.com> |
Hi,
I read the following code snippet. A question is here about '@'.
I don't find the answer online yet.
What function is it here?
BTW, below is for printing out?
"""theta = logit^{-1}(a+b)"""
but I don't see it is printed when the following could have been called.
Are you sure it would be printed out?
Thanks,
.................
import pymc
import numpy as np
n = 5*np.ones(4,dtype=int)
x = np.array([-.86,-.3,-.05,.73])
alpha = pymc.Normal('alpha',mu=0,tau=.01)
beta = pymc.Normal('beta',mu=0,tau=.01)
@pymc.deterministic
def theta(a=alpha, b=beta):
"""theta = logit^{-1}(a+b)"""
return pymc.invlogit(a+b*x)
d = pymc.Binomial('d', n=n, p=theta, value=np.array([0.,1.,3.,5.]),\
observed=True)
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
What is '@' for fl <rxjwg98@gmail.com> - 2015-11-13 15:04 -0800
Re: What is '@' for Chris Angelico <rosuav@gmail.com> - 2015-11-14 10:14 +1100
Re: What is '@' for Tim Daneliuk <tundraBOGUS@tundraware.com> - 2015-11-13 17:43 -0600
Re: What is '@' for Terry Reedy <tjreedy@udel.edu> - 2015-11-13 18:43 -0500
Re: What is '@' for Dave Farrance <df@see.replyto.invalid> - 2015-11-14 09:14 +0000
csiph-web