[SciPy-dev] 0.9.6.2201 NameError: global name 'pi' is not defined

John Byrnes byrnes at bu.edu
Mon Mar 6 13:07:24 CST 2006


You need to refer to pi as numpy.pi .

Regards,

John

On Mon, Mar 06, 2006 at 07:55:28PM +0100, Nils Wagner wrote:
> Traceback (most recent call last):
>    File "<stdin>", line 1, in ?
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/__init__.py", 
> line 46, in test
>      return NumpyTest().test(level, verbosity)
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/testing/numpytest.py", 
> line 422, in test
>      suites.extend(self._get_module_tests(module, 
> abs(level), verbosity))
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/testing/numpytest.py", 
> line 362, in _get_module_tests
>      return self._get_suite_list(test_module, level, 
> module.__name__)
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/testing/numpytest.py", 
> line 377, in _get_suite_list
>      suite = obj(mthname)
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/core/tests/test_ma.py", 
> line 17, in __init__
>      self.setUp()
>    File 
> "/usr/local/lib/python2.4/site-packages/numpy/core/tests/test_ma.py", 
> line 20, in setUp
>      x=numpy.array([1.,1.,1.,-2., pi/2.0, 4., 5., -10., 
> 10., 1., 2., 3.])
> NameError: global name 'pi' is not defined
> 
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev

-- 
An honest man can feel no pleasure in the exercise of power over his fellow citizens.
		-- Thomas Jefferson, letter to John Melish, January 13, 1813




More information about the Scipy-dev mailing list