[Numpy-discussion] Using normal()
Rich Shepard
rshepard at appl-ecosys.com
Thu Apr 24 13:51:15 EDT 2008
On Thu, 24 Apr 2008, Keith Goodman wrote:
> norm = 1 / (scale * sqrt(2 * pi))
> y = norm * exp(-power((x - loc), 2) / (2 * scale**2))
Hmm-m-m. I don't understand the source of the error:
y = norm * exp(-pow((x - loc), 2) / (2 * scale**2))
TypeError: only length-1 arrays can be converted to Python scalars
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the NumPy-Discussion
mailing list