Fixes this:

In [1]: from sympy.statistics import Normal

In [2]: d = Normal(0, 1)

In [3]: d.pdf(x)
---------------------------------------------------------------------------
NameError: global name 'pi' is not defined

It needs a tests. I'll send it tomorrow cause now I'm way too sleepy...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patches@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en
-~----------~----~----~----~------~----~------~--~---

From d92621f162dffecdc7ba6fab61b592d8485a2dd0 Mon Sep 17 00:00:00 2001
From: Riccardo Gori <[EMAIL PROTECTED]>
Date: Tue, 2 Dec 2008 01:19:10 +0100
Subject: [PATCH] Importing pi in statistics module prevents Normal.pdf to fail

---
 sympy/statistics/distributions.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sympy/statistics/distributions.py b/sympy/statistics/distributions.py
index a54ae03..2a3b40a 100644
--- a/sympy/statistics/distributions.py
+++ b/sympy/statistics/distributions.py
@@ -1,4 +1,4 @@
-from sympy.core import sympify, Lambda, Symbol, Integer, Rational, oo, Real
+from sympy.core import sympify, Lambda, Symbol, Integer, Rational, oo, Real, pi
 from sympy.functions import sqrt, exp, erf
 from sympy.printing import _StrPrinter as StrPrinter
 import random
-- 
1.5.6.4

Reply via email to