Permalink
Browse files

Remove sorted from unique1d. Add testall to test if level > 10. Remov…

…e compiler warning.
  • Loading branch information...
1 parent 289b1c6 commit 7a8ebd261c37307176bbad175ca60e99aa53fabf @teoliphant teoliphant committed Sep 20, 2006
Showing with 6 additions and 3 deletions.
  1. +4 −1 numpy/__init__.py
  2. +1 −1 numpy/core/src/multiarraymodule.c
  3. +1 −1 numpy/lib/arraysetops.py
View
@@ -82,7 +82,10 @@
"""
def test(level=1, verbosity=1):
- return NumpyTest().test(level, verbosity)
+ if level <= 10:
+ return NumpyTest().test(level, verbosity)
+ else:
+ return NumpyTest().testall(level, verbosity)
test.__doc__ = NumpyTest.test.__doc__
import add_newdocs
@@ -4529,7 +4529,7 @@ _convert_from_dict(PyObject *obj, int align)
totalsize = 0;
for(i=0; i<n; i++) {
PyObject *tup, *descr, *index, *item, *name, *off;
- int len, ret, _align;
+ int len, ret, _align=1;
PyArray_Descr *newdescr;
/* Build item to insert (descr, offset, [title])*/
View
@@ -64,7 +64,7 @@ def unique1d(ar1, retindx=False):
return perm.compress(flag), aux.compress(flag)
else:
- ar = numpy.array(sorted(ar))
+ ar.sort()
return ar.compress(ediff1d(ar, 1) != 0)
##

0 comments on commit 7a8ebd2

Please sign in to comment.