[Numpy-discussion] missing import in numpy.oldnumeric.mlab
Darren Dale
dd55 at cornell.edu
Fri Sep 8 11:03:02 EDT 2006
This was just reported on mpl-dev:
In [1]: from numpy.oldnumeric import mlab
In [2]: mlab.eye(3)
---------------------------------------------------------------------------
exceptions.NameError Traceback (most recent
call last)
/home/darren/<ipython console>
/usr/lib64/python2.4/site-packages/numpy/oldnumeric/mlab.py in eye(N, M, k,
typecode, dtype)
22 dtype = convtypecode(typecode, dtype)
23 if M is None: M = N
---> 24 m = nn.equal(nn.subtract.outer(nn.arange(N), nn.arange(M)),-k)
25 if m.dtype != dtype:
26 return m.astype(dtype)
NameError: global name 'nn' is not defined
More information about the NumPy-Discussion
mailing list