summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-20 19:01:00 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-20 19:01:00 +0000
commit7a8ebd261c37307176bbad175ca60e99aa53fabf (patch)
treeba6b0b33f467e7363e9befaa01184caa88f41816
parent289b1c6c44704de514659452ddb66c3d2e1656ce (diff)
downloadnumpy-7a8ebd261c37307176bbad175ca60e99aa53fabf.tar.gz
Remove sorted from unique1d. Add testall to test if level > 10. Remove compiler warning.
-rw-r--r--numpy/__init__.py5
-rw-r--r--numpy/core/src/multiarraymodule.c2
-rw-r--r--numpy/lib/arraysetops.py2
3 files changed, 6 insertions, 3 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index b84972815..a1b7c8006 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -82,7 +82,10 @@ testing --> ScipyTest, NumpyTest
"""
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
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c
index 4f8c931ca..4dd825ea9 100644
--- a/numpy/core/src/multiarraymodule.c
+++ b/numpy/core/src/multiarraymodule.c
@@ -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])*/
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index e7c86e97c..6c5115582 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -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)
##