Skip to content

Fixed the asarray bug. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pymc/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def gamma_expval(alpha, beta):

Expected value of gamma distribution.
"""
return 1. * asarray(alpha) / beta
return 1. * np.asrray(alpha) / beta

def gamma_like(x, alpha, beta):
R"""
Expand Down Expand Up @@ -1250,7 +1250,7 @@ def half_normal_expval(tau):
Expected value of half normal distribution.
"""

return np.sqrt(2. * pi / asarray(tau))
return np.sqrt(2. * pi / np.asrray(tau))

def half_normal_like(x, tau):
R"""
Expand Down Expand Up @@ -1334,7 +1334,7 @@ def inverse_gamma_expval(alpha, beta):

Expected value of inverse gamma distribution.
"""
return 1. * asarray(beta) / (alpha-1.)
return 1. * np.asrray(beta) / (alpha-1.)

def inverse_gamma_like(x, alpha, beta):
R"""
Expand Down Expand Up @@ -1572,7 +1572,7 @@ def multinomial_expval(n,p):

Expected value of multinomial distribution.
"""
return asarray([pr * n for pr in p])
return np.asrray([pr * n for pr in p])

def multinomial_like(x, n, p):
R"""
Expand Down