[Numpy-discussion] Min Error

David Reed david.reed.c at gmail.com
Sun Sep 22 10:21:18 EDT 2013


I am getting  a strange error when finding the minimum of a matrix.  The
weird thing is I get this while running within iPython shell, and if I do
%debug and go to the line where this fails and run the command `a =
np.min(D, axis=0)`, I get no error.

Here is the trace:

draw_lines/main.pyc in haus_distance(A, B)
     28         D = D.reshape((len(A), None))
---> 30         a = np.min(D, axis=0)
     32         # vp = np.max(np.min(D, axis=0))

anaconda/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in amin(a,
axis, out, keepdims)
   1985     else:
   1986         return _methods._amin(a, axis=axis,
-> 1987                             out=out, keepdims=keepdims)
   1989 def alen(a):

anaconda/lib/python2.7/site-packages/numpy/core/_methods.pyc in _amin(a,
axis, out, keepdims)
     12 def _amin(a, axis=None, out=None, keepdims=False):
     13     return um.minimum.reduce(a, axis=axis,
---> 14                             out=out, keepdims=keepdims)
     16 def _sum(a, axis=None, dtype=None, out=None, keepdims=False):

TypeError: an integer is required
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130922/f71479ae/attachment.html>

More information about the NumPy-Discussion mailing list