Giter VIP home page Giter VIP logo

numpy's Introduction


Powered by NumFOCUS PyPI Downloads Conda Downloads Stack Overflow Nature Paper OpenSSF Scorecard

NumPy is the fundamental package for scientific computing with Python.

It provides:

  • a powerful N-dimensional array object
  • sophisticated (broadcasting) functions
  • tools for integrating C/C++ and Fortran code
  • useful linear algebra, Fourier transform, and random number capabilities

Testing:

NumPy requires pytest and hypothesis. Tests can then be run after installation with:

python -c "import numpy, sys; sys.exit(numpy.test() is False)"

Code of Conduct

NumPy is a community-driven open source project developed by a diverse group of contributors. The NumPy leadership has made a strong commitment to creating an open, inclusive, and positive community. Please read the NumPy Code of Conduct for guidance on how to interact with others in a way that makes our community thrive.

Call for Contributions

The NumPy project welcomes your expertise and enthusiasm!

Small improvements or fixes are always appreciated. If you are considering larger contributions to the source code, please contact us through the mailing list first.

Writing code isn’t the only way to contribute to NumPy. You can also:

  • review pull requests
  • help us stay on top of new and old issues
  • develop tutorials, presentations, and other educational materials
  • maintain and improve our website
  • develop graphic design for our brand assets and promotional materials
  • translate website content
  • help with outreach and onboard new contributors
  • write grant proposals and help with other fundraising efforts

For more information about the ways you can contribute to NumPy, visit our website. If you’re unsure where to start or how your skills fit in, reach out! You can ask on the mailing list or here, on GitHub, by opening a new issue or leaving a comment on a relevant issue that is already open.

Our preferred channels of communication are all public, but if you’d like to speak to us in private first, contact our community coordinators at [email protected] or on Slack (write [email protected] for an invitation).

We also have a biweekly community call, details of which are announced on the mailing list. You are very welcome to join.

If you are new to contributing to open source, this guide helps explain why, what, and how to successfully get involved.

numpy's People

Contributors

ahaldane avatar asmeurer avatar bashtage avatar charris avatar cournape avatar eric-jones avatar eric-wieser avatar haozeke avatar jaimefrio avatar juliantaylor avatar mattip avatar mhvk avatar mtsokol avatar mwiebe avatar ngoldbaum avatar njsmith avatar pearu avatar pierregm avatar pv avatar r-devulap avatar rgommers avatar rkern avatar rossbar avatar seberg avatar seiko2plus avatar shoyer avatar stefanv avatar teoliphant avatar tylerjereddy avatar warrenweckesser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

numpy's Issues

assert_array_almost_equal_nulp tests only pass by chance

There are a ton of tests in numpy/testing/tests/test_utils.py that use np.random without setting a seed.

So first of all, that's a bug just by itself, because it means that the actual tests that are being run depends randomly on what other tests have been run -- as I discovered today while adding a totally different test that touch np.random and suddenly the tests in test_utils started failing. So all these tests should be using an explicit random seed.

Second, the fact that these tests are failing randomly as soon as the input is perturbed suggests that either assert_array_almost_equal_nulp or its tests are broken. And that we should be testing a lot more cases, since obviously the existing tests have not really been working (it's really easy to do for i in xrange(100): do_random_test()!).

Since I'm trying to get this other patch submitted, for now I'll just add a loop to TestArrayAlmostEqualNulp.test_simple to force it to fail consistently, and knownfail it. But someone who knows about this module should really take a look...

Regression in numpy.insert() when axis != None

I believe that the fix to Ticket #808 has caused a regression in numpy.insert()

This is the commit

Previously:

np.insert([[1,1,1]], 0, [2,2,2], axis=0)

gave:

 array([[2, 2, 2],
      [1, 1, 1]])

now it gives

array([[2, 2, 2],
   [2, 2, 2],
   [2, 2, 2],
   [1, 1, 1]])

I don't think is the correct result.

Also issue #378 is a result of same change

np.count_nonzero() should accept axis parameter

Currently, np.count_nonzero() accepts only the input array. I propose adding axis parameter similar to that of functions np.sum() and np.max() etc.

>>> A = np.arange(6).reshape(2,3)
>>> np.count_nonzero(A)  # with axis=None, count_nonzero in flattened A
5
>>> np.count_nonzero(A, axis=0)
array([1, 2, 2])
>>> np.count_nonzero(A, axis=1)
array([2, 3])

I think the alternative (A != 0).sum(axis=rows_or_cols) isn't as clear.

NumPy fails to compile in Ubuntu 11.10

The latest NumPy version (36681eb) fails to compile in Ubuntu 11.10 with the error:

creating build/temp.linux-x86_64-2.6/numpy/linalg
compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.6/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/home/ondrej/repos/qsnake/local/include/python2.6 -Ibuild/src.linux-x86_64-2.6/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.6/numpy/core/src/umath -c'
gcc: numpy/linalg/python_xerbla.c
gcc: numpy/linalg/lapack_litemodule.c
/usr/bin/gfortran -Wall build/temp.linux-x86_64-2.6/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.6/numpy/linalg/python_xerbla.o -L/home/ondrej/repos/qsnake/local/lib -L/home/ondrej/repos/qsnake/local/lib -Lbuild/temp.linux-x86_64-2.6 -llapack -lblas -lpython2.6 -lgfortran -o build/lib.linux-x86_64-2.6/numpy/linalg/lapack_lite.so
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 19
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 19
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall build/temp.linux-x86_64-2.6/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.6/numpy/linalg/python_xerbla.o -L/home/ondrej/repos/qsnake/local/lib -L/home/ondrej/repos/qsnake/local/lib -Lbuild/temp.linux-x86_64-2.6 -llapack -lblas -lpython2.6 -lgfortran -o build/lib.linux-x86_64-2.6/numpy/linalg/lapack_lite.so" failed with exit status 1

The fix is either to apply the following patch (as is done in the official Debian/Ubuntu NumPy deb package):


--- python-numpy-1.5.1.orig/numpy/distutils/fcompiler/gnu.py
+++ python-numpy-1.5.1/numpy/distutils/fcompiler/gnu.py
@@ -245,7 +245,7 @@ class Gnu95FCompiler(GnuFCompiler):
         'compiler_f90' : [None, "-Wall", "-fno-second-underscore"] + _EXTRAFLAGS,
         'compiler_fix' : [None, "-Wall", "-ffixed-form",
                           "-fno-second-underscore"] + _EXTRAFLAGS,
-        'linker_so'    : ["<F90>", "-Wall"],
+        'linker_so'    : ["<F90>", "-Wall", "-shared"],
         'archiver'     : ["ar", "-cr"],
         'ranlib'       : ["ranlib"],
         'linker_exe'   : [None, "-Wall"]

Or simply:

export LDFLAGS="-shared"
python setup.py install

As such, it should be at least documented in the INSTALL.txt.

Bug in reshape for 0-stride arrays

The following test fails as reported on the ML:
http://thread.gmane.org/gmane.comp.python.numeric.general/51227/focus=51240

x = array([5])
y = np.lib.stride_tricks.as_strided(x, shape=(10,), strides=(0,))
z = y.reshape([10,1])
assert np.all(z == 5) # FAIL!

In the same thread Sebastian Berg has proposed the following patch:

+++ b/numpy/core/src/multiarray/shape.c
@@ -273,21 +273,21 @@ PyArray_Newshape(PyArrayObject *self, PyArray_Dims
*newdims,
          * appropriate value to preserve contiguousness
          */
         if (order == NPY_FORTRANORDER) {
-            if (strides[0] == 0) {
+            if ((strides[0] == 0) && (dimensions[0] == 1)) {
                 strides[0] = PyArray_DESCR(self)->elsize;
             }
             for (i = 1; i < ndim; i++) {
-                if (strides[i] == 0) {
+                if ((strides[i] == 0) && (dimensions[i] == 1)) {
                     strides[i] = strides[i-1] * dimensions[i-1];
                 }
             }
         }
         else {
-            if (strides[ndim-1] == 0) {
+            if ((strides[ndim-1] == 0) && (dimensions[ndim-1] == 1)) {
                 strides[ndim-1] = PyArray_DESCR(self)->elsize;
             }
             for (i = ndim - 2; i > -1; i--) {
-                if (strides[i] == 0) {
+                if ((strides[i] == 0) && (dimensions[i] == 1)) {
                     strides[i] = strides[i+1] * dimensions[i+1];
                 }
             }

1.7.0b1 - Unittest errors building on Debian hurd-i386

Hello,
when building 1.7.0b1 on Debian unstable hurd-i386 the tests suite returns some error:

-- running tests for 2.7 plain --
.............................................................................................................................................................................................................................................E.............................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_flush (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_memmap.py", line 72, in test_flush
    fp.flush()
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/memmap.py", line 301, in flush
    self.base.flush()
error: [Errno 1073741902] Function not implemented

----------------------------------------------------------------------
Ran 4764 tests in 212.868s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 27 2012, 09:10:49) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 2.7 debug --
.............................................................................................................................................................................................................................................E.............................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_flush (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_memmap.py", line 72, in test_flush
    fp.flush()
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/memmap.py", line 301, in flush
    self.base.flush()
error: [Errno 1073741902] Function not implemented

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4764 tests in 251.522s

FAILED (KNOWNFAIL=5, SKIP=9, errors=2)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 27 2012, 09:28:21) [GCC 4.7.1]
nose version 1.1.2
[1659051 refs]
-- running tests for 2.6 plain --
.............................................................................................................................................................................................................................................E.............................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_flush (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_memmap.py", line 72, in test_flush
    fp.flush()
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/memmap.py", line 301, in flush
    self.base.flush()
error: [Errno 1073741902] Function not implemented

----------------------------------------------------------------------
Ran 4764 tests in 211.101s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jul  3 2012, 21:45:27) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 2.6 debug --
.............................................................................................................................................................................................................................................E.............................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_flush (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_memmap.py", line 72, in test_flush
    fp.flush()
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/memmap.py", line 301, in flush
    self.base.flush()
error: [Errno 1073741902] Function not implemented

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4764 tests in 243.031s

FAILED (KNOWNFAIL=5, SKIP=9, errors=2)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jul  3 2012, 23:47:22) [GCC 4.7.1]
nose version 1.1.2
[1642587 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
    echo "-- running tests for "$v" plain --" ; \
    python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    echo "-- running tests for "$v" debug --" ; \
    python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
.............................................................................................................................................................................................................................................E.............................................................S.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmp1gv5yg.npz'>
  self.fp = None
.................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_flush (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_memmap.py", line 72, in test_flush
    fp.flush()
  File "/build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/memmap.py", line 301, in flush
    self.base.flush()
mmap.error: [Errno 1073741902] Function not implemented

----------------------------------------------------------------------
Ran 4763 tests in 580.917s

FAILED (KNOWNFAIL=6, SKIP=8, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-hurd-i386-c6f3__/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Jul  2 2012, 17:48:45) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=hurd-i386&ver=1%3A1.7.0~b1-1&stamp=1346549189

Regards,
Sandro

Bug in numpy.where

On a Linux machine:

uname -srvop
Linux 2.6.18-308.8.2.el5 #1 SMP Tue May 29 11:54:17 EDT 2012 x86_64
GNU/Linux

this example shows a problem with the where function:

Python 2.7.1 (r271:86832, Dec 21 2010, 11:19:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import numpy as np
print np.version
1.5.1
net = np.zeros(3, dtype='>f4')
net[1] = 0.00458849
net[2] = 0.605202
max_net = net.max()
test = np.where(net <= 0., max_net, net)
print test
[ -2.23910537e-35 4.58848989e-03 6.05202019e-01]

When I specified the dtype for net as '>f8', test[0] was 3.46244974e+68. It worked as expected (i.e. test[0] should be 0.605202) when I specified float(max_net) as the second argument to np.where.

RuntimeWarning: invalid value encountered in power

See here: http://travis-ci.org/#!/numpy/numpy/jobs/2337235

======================================================================
2784ERROR: Test a special case for var
2785----------------------------------------------------------------------
2786Traceback (most recent call last):
2787  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/numpy/ma/tests/test_core.py", line 2731, in test_varstd_specialcases
2788    _ = method(out=mout)
2789  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/numpy/ma/core.py", line 4780, in std
2790    np.power(out, 0.5, out=out, casting='unsafe')
2791RuntimeWarning: invalid value encountered in power

This is related to #394.

ENH: CreateSortedStridePerm suboptimal

The CreateSortedStridePerm does not work correctly when it comes to non C ordered arrays that include a 1 dimensional axis somewhere in the middle (and are not contiguous as this is typically optimized anyways). Its a corner case, but since I noticed thought I would post it.

For these cases it will fail to sort the array and this results unnecessarily slow operations for some things. (IE: e = np.empty(400,400,400)[::2,::2,::2]; e[:,0,:] = 5) is much faster then e[:,0:1,:] = 5. Also this means that e.copy('k') is not Fortran order, which maybe it never was, but seems not what one would expect.

NumPy docs: LaTeX Error: Too deeply nested

This is what I get when I try to build the docs:

(bootstrap)vagrant@precise32:~/repos/numpy2/doc/build/latex$ pdflatex numpy-ref.tex
[...]
LaTeX Warning: Hyper reference `reference/generated/numpy.amin:numpy.amin' on p
age 21 undefined on input line 2206.


LaTeX Warning: Hyper reference `reference/generated/numpy.amin:numpy.amin' on p
age 21 undefined on input line 2212.


Overfull \hbox (2.5pt too wide) in paragraph at lines 2227--2228
[]

! LaTeX Error: Too deeply nested.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.2245 \begin{Verbatim}[commandchars=\\\{\}]

? 

I will keep investigating. This suggests a deeper problem: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=toodeep

1.7.0b1 - Unittest errors building on Debian mips

Hello,
when building 1.7.0b1 on Debian unstable mips the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S.....................E..E....................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.....E..........E.............E.....E.EEE....E....E..................................................................................................................................SSS...................................................................................................................................................................................................................................................................................E...........................K................................................................EEE............E.............EEEEK......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E....................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_searchsorted (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_multiarray.py", line 791, in test_searchsorted
    a.real += [0, 0, 1, 1, 0, 1, np.nan, np.nan, np.nan]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_sort (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_multiarray.py", line 484, in test_sort
    a.real += [np.nan, np.nan, np.nan, 1, 0, 1, 1, 0, 0]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_numeric.TestIsclose.test_equal_nan
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1265, in test_equal_nan
    assert_array_equal(isclose(nan, nan, equal_nan=True), [True])
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in multiply)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1234, in test_ip_isclose
    yield (assert_array_equal, isclose(x, y), result)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([0], [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(0, [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_none_isclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1241, in tst_none_isclose
    assert_(not any(isclose(x, y)), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_masked_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1274, in test_masked_arrays
    assert_(type(x) == type(isclose(inf, x)))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 3648, in __mul__
    return multiply(self, other)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 950, in __call__
    result += m * da
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_nan_any (test_umath.TestArctan2SpecialValues)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 411, in test_nan_any
    assert_arctan2_isnan(np.nan, np.inf)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 328, in assert_arctan2_isnan
    assert_(np.isnan(ncu.arctan2(x, y)), "arctan(%s, %s) is %s, not nan" % (x, y, ncu.arctan2(x, y)))
RuntimeWarning: invalid value encountered in arctan2

======================================================================
ERROR: test_umath.test_nextafter
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1123, in test_nextafter
    return _test_nextafter(np.float64)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1126, in test_nextafterf
    return _test_nextafter(np.float32)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1131, in test_nextafterl
    return _test_nextafter(np.longdouble)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in absolute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 482, in test_cabs_inf_nan
    ref = g(x[i], y[i])
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 477, in g
    return np.abs(np.complex(a, b))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, 0, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, 0, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, inf, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/tests/test_regression.py", line 51, in test_poly1d_nan_roots
    self.assertRaises(np.linalg.LinAlgError,getattr,p,"r")
  File "/usr/lib/python2.7/unittest/case.py", line 476, in assertRaises
    callableObj(*args, **kwargs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 1200, in __getattr__
    return roots(self.coeffs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 224, in roots
    A[0, :] = -p[1:] / p[0]
RuntimeWarning: invalid value encountered in divide

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4785 tests in 2006.096s

FAILED (KNOWNFAIL=5, SKIP=5, errors=24)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 19:24:34) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4792 tests in 2328.468s

FAILED (KNOWNFAIL=5, SKIP=5, errors=6)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 14:33:04) [GCC 4.6.3]
nose version 1.1.2
[1518851 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S.....................E..E....................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.....E..........E.............E.....E.EEE....E....E..................................................................................................................................SSS...................................................................................................................................................................................................................................................................................E...........................K................................................................EEE............E.............EEEEK......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E....................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_searchsorted (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_multiarray.py", line 791, in test_searchsorted
    a.real += [0, 0, 1, 1, 0, 1, np.nan, np.nan, np.nan]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_sort (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_multiarray.py", line 484, in test_sort
    a.real += [np.nan, np.nan, np.nan, 1, 0, 1, 1, 0, 0]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_numeric.TestIsclose.test_equal_nan
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1265, in test_equal_nan
    assert_array_equal(isclose(nan, nan, equal_nan=True), [True])
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in multiply)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1234, in test_ip_isclose
    yield (assert_array_equal, isclose(x, y), result)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([0], [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(0, [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_none_isclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1241, in tst_none_isclose
    assert_(not any(isclose(x, y)), msg % (x, y))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_masked_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1274, in test_masked_arrays
    assert_(type(x) == type(isclose(inf, x)))
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 3648, in __mul__
    return multiply(self, other)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 950, in __call__
    result += m * da
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_nan_any (test_umath.TestArctan2SpecialValues)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 411, in test_nan_any
    assert_arctan2_isnan(np.nan, np.inf)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 328, in assert_arctan2_isnan
    assert_(np.isnan(ncu.arctan2(x, y)), "arctan(%s, %s) is %s, not nan" % (x, y, ncu.arctan2(x, y)))
RuntimeWarning: invalid value encountered in arctan2

======================================================================
ERROR: test_umath.test_nextafter
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1123, in test_nextafter
    return _test_nextafter(np.float64)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1126, in test_nextafterf
    return _test_nextafter(np.float32)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1131, in test_nextafterl
    return _test_nextafter(np.longdouble)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in absolute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 482, in test_cabs_inf_nan
    ref = g(x[i], y[i])
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 477, in g
    return np.abs(np.complex(a, b))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, 0, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, 0, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, inf, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/tests/test_regression.py", line 51, in test_poly1d_nan_roots
    self.assertRaises(np.linalg.LinAlgError,getattr,p,"r")
  File "/usr/lib/python2.6/unittest.py", line 336, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/polynomial.py", line 1200, in __getattr__
    return roots(self.coeffs)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/polynomial.py", line 224, in roots
    A[0, :] = -p[1:] / p[0]
RuntimeWarning: invalid value encountered in divide

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4785 tests in 1973.746s

FAILED (KNOWNFAIL=5, SKIP=5, errors=24)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 03:02:04) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd2-python-numpy_1.7.0~b1-1-mips-vVC1yE/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equ

prepare_bootstrap.py doesn't seem to work

I was trying to use tools/win32build/ and I read the README there, but this is what I got so far:

$ python prepare_bootstrap.py
[...]
adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/Tensor.i'
adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/Array.i'
adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/setup.py'
removing 'numpy-1.7.0.dev-f93774d' (and everything under it)
Running from numpy source directory.
Traceback (most recent call last):
  File "prepare_bootstrap.py", line 109, in <module>
    prepare_bootstrap(pyver)
  File "prepare_bootstrap.py", line 65, in prepare_bootstrap
    prepare_numpy_sources(bootstrap)
  File "prepare_bootstrap.py", line 27, in prepare_numpy_sources
    zid = ZipFile(pjoin('..', '..', 'dist', get_sdist_tarball()))
  File "prepare_bootstrap.py", line 12, in get_sdist_tarball
    name = "numpy-%s.zip" % get_numpy_version()
  File "prepare_bootstrap.py", line 82, in get_numpy_version
    out = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE).communicate()[0]
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Looks like svn is missing, so I installed it and:

adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/Tensor.i'
adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/Array.i'
adding 'numpy-1.7.0.dev-f93774d/doc/swig/test/setup.py'
removing 'numpy-1.7.0.dev-f93774d' (and everything under it)
Running from numpy source directory.
svn: '.' is not a working copy
Traceback (most recent call last):
  File "prepare_bootstrap.py", line 109, in <module>
    prepare_bootstrap(pyver)
  File "prepare_bootstrap.py", line 65, in prepare_bootstrap
    prepare_numpy_sources(bootstrap)
  File "prepare_bootstrap.py", line 27, in prepare_numpy_sources
    zid = ZipFile(pjoin('..', '..', 'dist', get_sdist_tarball()))
  File "prepare_bootstrap.py", line 12, in get_sdist_tarball
    name = "numpy-%s.zip" % get_numpy_version()
  File "prepare_bootstrap.py", line 91, in get_numpy_version
    raise ValueError("Error while parsing svn version ?")
ValueError: Error while parsing svn version ?

So it's probably assuming that NumPy is installed using svn.

Can it be, that these scripts are outdated, or that I am using it incorrectly?

``sum`` method returns array with invalid C/F-contiguous flags

>>> x = np.random.random((5, 3))
>>> y = x.sum(0)
>>> print y.flags
  C_CONTIGUOUS : False
  F_CONTIGUOUS : False
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False
>>> print y.strides, y.dtype
(8,) float64

This still works in 1.5.1. Broken on the latest Git HEAD.

It affects all reductions of ndarray objects.

genfromtxt can fail when using None as a 'comments' keyword argument

genfromtxt has a bug where using None as a 'comments' keyword argument causes the text string "None" to be treated as a comment. This causes exceptions when loading large datasets if the string "None" occurs by chance.

eg

genfromtxt(["test1\ttestNonethrestofthedata"],dtype=None, comments=None, delimiter='\t')
array(['test1', 'test'],
dtype='|S5')

The problem is due to a conversion to str using 'asbytes' on Lines 1295-1296 of numpy / numpy / lib / npyio.py:

# Py3 data conversions to bytes, for convenience
comments = asbytes(comments)

This should be wrapped in a conditional:

if comments != None:
comments = asbytes(comments)

math functions fail confusingly on long integers (and object arrays generally)

If you pass a 'long' integer greater than sys.maxint to np.sqrt, then it blows up with a confusing error message:

>>> np.__version__
'1.8.0.dev-1234d1c'
>>> np.sqrt(sys.maxint)
3037000499.9760499
>>> np.sqrt(sys.maxint + 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: sqrt

This was noticed because it breaks SciPy's kendalltau function: http://mail.scipy.org/pipermail/scipy-user/2012-July/032652.html

It was hard to diagnose because the error message is so misleading.

It looks like what's going on is that ndarray conversion on very large 'long' objects gives up and simply returns an object array. So... that seems reasonable, not sure what else we could do:

>>> np.asarray(sys.maxint + 1)
array(9223372036854775808L, dtype=object)

And then when called on an object array, np.sqrt does its weird ad-hoc fallback thing, and tries calling a .sqrt() method on each object. Which of course doesn't exist, since it's just something we made up. (But this is where the confusing error message comes from.) In fact, our handling of object arrays is pretty broken all around -- we can't even take the square root of float objects:

>>> np.sqrt(np.array(1.0, dtype=object))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: sqrt

The math module versions of sqrt and friends accept long integers:

>>> math.sqrt(sys.maxint + 1)
3037000499.97605
>>> math.cos(sys.maxint + 1)
0.011800076512800236

Mostly this just works by calling PyFloat_AsDouble, which goes via the float method if defined (as it is for longs). However, the math module does have special code for longs in some cases (log in 2.7, maybe more in future versions, who knows):

>>> math.sqrt(sys.maxint ** 100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: long int too large to convert to float
>>> math.log(sys.maxint ** 100)
4366.827237527655

So in conclusion: np.sqrt and friends, when operating on object arrays, should fall back to the stdlib math functions. (This would be in addition to the current .sqrt method fallback. I guess the current fallback should probably be tried, since anyone defining our ad-hoc methods is presumably doing so specifically because they want numpy to respect that.)

1.7.0b1 - Unittest errors building on Debian sparc

Hello,
when building 1.7.0b1 on Debian unstable sparc the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4800 tests in 97.745s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 27 2012, 10:49:43) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4800 tests in 273.759s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 27 2012, 10:52:50) [GCC 4.6.3]
nose version 1.1.2
[1599162 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4800 tests in 93.580s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 07:45:13) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4800 tests in 248.555s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 11:40:23) [GCC 4.6.3]
nose version 1.1.2
[1582610 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
...........................................................................................................................................................................................................................................................................................................S.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K......................K................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................/usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmp1we810.npz'>
  self.fp = None
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4799 tests in 111.684s

FAILED (KNOWNFAIL=6, SKIP=4, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-sparc-OOi9BW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Aug 27 2012, 01:36:13) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=sparc&ver=1%3A1.7.0~b1-1&stamp=1346421921

Regards,
Sandro

ERROR: test_power_zero (test_umath.TestPower) with python2.* debug flavour

Hello,
the test suite executed under debug flavor of python2.6 or 2.7 returns this error:

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/buildd/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------

The built was run on a Debian unstable distribution. For a fill log, you can refer to: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=i386&ver=1%3A1.7.0~b1-1&stamp=1346419177

Regards,
Sandro

1.7.0b1 - Unittest errors building on Debian kfreebsd-amd64

Hello,
when building 1.7.0b1 on Debian unstable kfreebsd-amd64 the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
----------------------------------------------------------------------
Ran 4756 tests in 37.567s

OK (KNOWNFAIL=5, SKIP=9)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 13:49:11) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4756 tests in 68.049s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 13:51:32) [GCC 4.7.1]
nose version 1.1.2
[1569046 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
----------------------------------------------------------------------
Ran 4756 tests in 34.671s

OK (KNOWNFAIL=5, SKIP=9)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 22:24:19) [GCC 4.7.0]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4756 tests in 63.719s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 23:15:14) [GCC 4.7.0]
nose version 1.1.2
[1552563 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
...........................................................................................................................................................................................................................................................................................................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmpo2d8ff.npz'>
  self.fp = None
.................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
----------------------------------------------------------------------
Ran 4755 tests in 62.970s

OK (KNOWNFAIL=6, SKIP=8)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-amd64-w20ewW/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Aug 27 2012, 21:56:45) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted (core dumped)

Ful build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=kfreebsd-amd64&ver=1%3A1.7.0~b1-1&stamp=1346419487

Regards,
Sandro

Build with NPY_SEPARATE_COMPILATION=1 fails

Building with

export NPY_SEPARATE_COMPILATION=1
python setup.py build

fails after recent changes (works still in 651ef74):

gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/numpy/core/src/umath/umathmodule.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/umath/loops.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/ufunc_object.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/ufunc_type_resolution.o -Lbuild/temp.linux-x86_64-2.7 -lnpymath -lm -o build/lib.linux-x86_64-2.7/numpy/core/umath.so
build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: In function `allocate_reduce_result':
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:48: undefined reference to `PyArray_CreateSortedStridePerm'
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:67: undefined reference to `PyArray_Type'
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: relocation R_X86_64_PC32 against undefined hidden symbol `PyArray_Type' can not be used when making a shared object
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status
build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: In function `allocate_reduce_result':
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:48: undefined reference to `PyArray_CreateSortedStridePerm'
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:67: undefined reference to `PyArray_Type'
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: relocation R_X86_64_PC32 against undefined hidden symbol `PyArray_Type' can not be used when making a shared object
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status

Time to scrap the one-file build?

1.7.0b1 - Unittest errors building on Debian mipsel

Hello,
when building 1.7.0b1 on Debian unstable mipsel the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S.....................E..E....................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.....E..........E.............E.....E.EEE....E....E..................................................................................................................................SSS...................................................................................................................................................................................................................................................................................E...........................K................................................................EEE............E.............EEEEK......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E....................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_searchsorted (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_multiarray.py", line 791, in test_searchsorted
    a.real += [0, 0, 1, 1, 0, 1, np.nan, np.nan, np.nan]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_sort (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_multiarray.py", line 484, in test_sort
    a.real += [np.nan, np.nan, np.nan, 1, 0, 1, 1, 0, 0]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_numeric.TestIsclose.test_equal_nan
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1265, in test_equal_nan
    assert_array_equal(isclose(nan, nan, equal_nan=True), [True])
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in multiply)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1234, in test_ip_isclose
    yield (assert_array_equal, isclose(x, y), result)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([0], [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(0, [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_none_isclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1241, in tst_none_isclose
    assert_(not any(isclose(x, y)), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_masked_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1274, in test_masked_arrays
    assert_(type(x) == type(isclose(inf, x)))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 3648, in __mul__
    return multiply(self, other)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 950, in __call__
    result += m * da
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_nan_any (test_umath.TestArctan2SpecialValues)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 411, in test_nan_any
    assert_arctan2_isnan(np.nan, np.inf)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 328, in assert_arctan2_isnan
    assert_(np.isnan(ncu.arctan2(x, y)), "arctan(%s, %s) is %s, not nan" % (x, y, ncu.arctan2(x, y)))
RuntimeWarning: invalid value encountered in arctan2

======================================================================
ERROR: test_umath.test_nextafter
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1123, in test_nextafter
    return _test_nextafter(np.float64)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1126, in test_nextafterf
    return _test_nextafter(np.float32)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1131, in test_nextafterl
    return _test_nextafter(np.longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in absolute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 482, in test_cabs_inf_nan
    ref = g(x[i], y[i])
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 477, in g
    return np.abs(np.complex(a, b))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, 0, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, 0, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, inf, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/tests/test_regression.py", line 51, in test_poly1d_nan_roots
    self.assertRaises(np.linalg.LinAlgError,getattr,p,"r")
  File "/usr/lib/python2.7/unittest/case.py", line 476, in assertRaises
    callableObj(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 1200, in __getattr__
    return roots(self.coeffs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 224, in roots
    A[0, :] = -p[1:] / p[0]
RuntimeWarning: invalid value encountered in divide

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4785 tests in 217.077s

FAILED (KNOWNFAIL=5, SKIP=5, errors=24)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 16:59:14) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4792 tests in 511.190s

FAILED (KNOWNFAIL=5, SKIP=5, errors=6)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 14:11:05) [GCC 4.6.3]
nose version 1.1.2
[1518408 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S.....................E..E....................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.....E..........E.............E.....E.EEE....E....E..................................................................................................................................SSS...................................................................................................................................................................................................................................................................................E...........................K................................................................EEE............E.............EEEEK......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E....................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_searchsorted (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_multiarray.py", line 791, in test_searchsorted
    a.real += [0, 0, 1, 1, 0, 1, np.nan, np.nan, np.nan]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_sort (test_multiarray.TestMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_multiarray.py", line 484, in test_sort
    a.real += [np.nan, np.nan, np.nan, 1, 0, 1, 1, 0, 0]
RuntimeWarning: invalid value encountered in add

======================================================================
ERROR: test_numeric.TestIsclose.test_equal_nan
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1265, in test_equal_nan
    assert_array_equal(isclose(nan, nan, equal_nan=True), [True])
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in multiply)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1234, in test_ip_isclose
    yield (assert_array_equal, isclose(x, y), result)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([0], [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(0, [1e-08, inf, -inf, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_none_isclose([nan, 0], [nan, -inf])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1241, in tst_none_isclose
    assert_(not any(isclose(x, y)), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2069, in isclose
    x = x * ones_like(cond)
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_numeric.TestIsclose.test_masked_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1274, in test_masked_arrays
    assert_(type(x) == type(isclose(inf, x)))
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 2070, in isclose
    y = y * ones_like(cond)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 3648, in __mul__
    return multiply(self, other)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 950, in __call__
    result += m * da
RuntimeWarning: invalid value encountered in multiply

======================================================================
ERROR: test_nan_any (test_umath.TestArctan2SpecialValues)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 411, in test_nan_any
    assert_arctan2_isnan(np.nan, np.inf)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 328, in assert_arctan2_isnan
    assert_(np.isnan(ncu.arctan2(x, y)), "arctan(%s, %s) is %s, not nan" % (x, y, ncu.arctan2(x, y)))
RuntimeWarning: invalid value encountered in arctan2

======================================================================
ERROR: test_umath.test_nextafter
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1123, in test_nextafter
    return _test_nextafter(np.float64)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1126, in test_nextafterf
    return _test_nextafter(np.float32)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: test_umath.test_nextafterl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1131, in test_nextafterl
    return _test_nextafter(np.longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1118, in _test_nextafter
    assert_(np.isnan(np.nextafter(np.nan, one)))
RuntimeWarning: invalid value encountered in nextafter

======================================================================
ERROR: Failure: RuntimeWarning (invalid value encountered in absolute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 264, in generate
    for test in g():
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 482, in test_cabs_inf_nan
    ref = g(x[i], y[i])
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 477, in g
    return np.abs(np.complex(a, b))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, 0, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, 0, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, nan, inf, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, nan, nan, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 556, in check_real_value
    assert_almost_equal(f(z1), x)
RuntimeWarning: invalid value encountered in _arg

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/tests/test_regression.py", line 51, in test_poly1d_nan_roots
    self.assertRaises(np.linalg.LinAlgError,getattr,p,"r")
  File "/usr/lib/python2.6/unittest.py", line 336, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/polynomial.py", line 1200, in __getattr__
    return roots(self.coeffs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/lib/polynomial.py", line 224, in roots
    A[0, :] = -p[1:] / p[0]
RuntimeWarning: invalid value encountered in divide

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
ERROR: test_nan_array (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/tests/test_utils.py", line 264, in test_nan_array
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_nan_items (test_utils.TestApproxEqual)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/tests/test_utils.py", line 276, in test_nan_items
    self._assert_func(anan, anan)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 540, in assert_approx_equal
    sc_desired = desired/scale
RuntimeWarning: invalid value encountered in double_scalars

----------------------------------------------------------------------
Ran 4785 tests in 197.979s

FAILED (KNOWNFAIL=5, SKIP=5, errors=24)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 07:20:45) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................EE..............K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-mipsel-VxuHJc/python-numpy-1.7.0~b1/debian/tmp/usr/lib/py

Test NumPy 1.7 against as many packages as possible

This is important to find things that break (either at compile time or run time) and clearly document how to upgrade to NumPy 1.7 in the release notes.

Packages to test at least (feel free to edit, add more packages): scipy, matplotlib, pandas, h5py

Also try to simply update the package in Debian/Ubuntu and see if it works well with other packages.

RuntimeWarning: invalid value encountered in absolute

Sometimes I am getting these errors when running tests:

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

These are caused by calling allclose(x, y) with for example x = array([1, nan, 2]) (the array contains nan). Then inside allclose, one calls abs on the array of nans, which produces the warning. It can be reproduced by simply doing:

>>> from numpy import array, abs, nan
>>> a = array([1, nan, 3])
>>> a
array([  1.,  nan,   3.])
>>> abs(a)
__main__:1: RuntimeWarning: invalid value encountered in absolute
array([  1.,  nan,   3.])

Typestring "h2" works in 1.6, fails in master

Problem (which breaks scipy):
http://mail.scipy.org/pipermail/numpy-discussion/2012-June/062605.html

Analysis:
http://mail.scipy.org/pipermail/numpy-discussion/2012-June/062606.html

Todo:

  • Re-enable parsing of type-strings like "h2" before the 1.7 release [DONE]
  • Give a deprecation warning for type-strings like "h100". Possibly also for type-strings like "h2" -- this isn't obvious. [DONE]
  • Disable at least "h100"- style type-strings for 1.9, or whenever we decide to finalize the deprecations that started in 1.7.

Ticket 1588

This issue is for the ticket:

http://projects.scipy.org/numpy/ticket/1588

Because the trac server is unreliable (frequently fails and I need to wait couple minutes for the database to be unlocked again --- see my email to the numpy list) and I need to keep track of my progress.

Summary of the problem

The following patch fixes it, but probably creates a leak sometimes:

diff --git a/numpy/core/src/multiarray/calculation.c b/numpy/core/src/multiarray/calculation.c
index 618a871..a360c4e 100644
--- a/numpy/core/src/multiarray/calculation.c
+++ b/numpy/core/src/multiarray/calculation.c
@@ -981,7 +981,7 @@ PyArray_Clip(PyArrayObject *self, PyObject *min, PyObject *max, PyArrayObject *o
     }
     else {
         /* Side-effect of PyArray_FromAny */
-        Py_DECREF(indescr);
+        //Py_DECREF(indescr);
     }

     /*

This code was first introduced by 9405a87 and the moved around later. There is no problem with this commit. The actual segfault was introduced between the commits 9a9f08e (good) and 64e30a7 (bad). Overall diff of these is: 9a9f08e...64e30a7

The problem might be in the changes in the ctors.c file. At the moment, the correct fix (without leaks) is unclear. See the comments below for detailed analysis.

npyio.py --> recfromcsv seems to have a bug that ignores any dtypes provided

I found this due to someone's problem loading large integers with recfromcsv. After playing with it, I think it is simply ignoring all the dtype information provided.

Line 1859 in npyio.py, part of recfromcsv() tries to either bring in the dtypes passed or set None. However, it actually brings in a kwarg that I couldn't find anywhere else called 'update' which looks suspiciously like a copied mistype from earlier in the line. If I change 'update' --> 'dtype', then the types get picked up as expected. More explicitly, in recfromcsv, change:

kwargs.update(dtype=kwargs.get('update', None),

to this:

kwargs.update(dtype=kwargs.get('dtype', None),

I found this in the github repo (although I may have been looking at the wrong branch) as well as the 1.6.2 release that I am using.

_(apologies for double posting this. I posted in trac first and then heard that maybe that won't be looked at. I haven't found a way to delete or close that ticket.)_

1.7.0b1 - Unittest errors building on Debian armhf

Hello,
when building 1.7.0b1 on armhf the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 178.151s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 19:45:56) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 384.381s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4)
[1518462 refs]
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 17:14:37) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 193.536s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 23:23:01) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 370.729s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4)
[1501921 refs]
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 02:52:28) [GCC 4.6.3]
nose version 1.1.2
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
...........................................................................................................................................................................................................................................................................................................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K......................K................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................/usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmp1w6mmd.npz'>
  self.fp = None
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4791 tests in 211.993s

FAILED (KNOWNFAIL=6, SKIP=4, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armhf-96y8pG/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Jul 14 2012, 01:47:24) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=armhf&ver=1%3A1.7.0~b1-1&stamp=1346425398

Regards,
Sandro

1.7.0b1 - Unittest errors building on Debian armel

Hello,
when building 1.7.0b1 on Debian unstable armel the tests suite returns some error:

-- running tests for 2.7 plain --
....................................................................................................................................................................................................F..................F...................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................................................F................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.F..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
FAIL: test_invalid (test_errstate.TestErrstate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 20, in test_invalid
AssertionError: Did not raise an invalid error

======================================================================
FAIL: Test that half raises the correct underflows and overflows
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_half.py", line 407, in test_half_fpe
    assert_raises_fpe('invalid', np.divide, float16(np.inf), float16(np.inf))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_half.py", line 15, in assert_raises_fpe
    "Did not raise floating point %s error" % strmatch)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Did not raise floating point invalid error

======================================================================
FAIL: test_divide_err (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 257, in test_divide_err
    self.fail()
AssertionError: None

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 168, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised

----------------------------------------------------------------------
Ran 4792 tests in 267.196s

FAILED (KNOWNFAIL=5, SKIP=5, failures=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 21:14:23) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
....................................................................................................................................................................................................F..................F...................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................................................F................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.F..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
FAIL: test_invalid (test_errstate.TestErrstate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 20, in test_invalid
AssertionError: Did not raise an invalid error

======================================================================
FAIL: Test that half raises the correct underflows and overflows
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_half.py", line 407, in test_half_fpe
    assert_raises_fpe('invalid', np.divide, float16(np.inf), float16(np.inf))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_half.py", line 15, in assert_raises_fpe
    "Did not raise floating point %s error" % strmatch)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Did not raise floating point invalid error

======================================================================
FAIL: test_divide_err (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 257, in test_divide_err
    self.fail()
AssertionError: None

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath_complex.py", line 168, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised

----------------------------------------------------------------------
Ran 4792 tests in 534.189s

FAILED (KNOWNFAIL=5, SKIP=5, failures=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 18:01:12) [GCC 4.6.3]
nose version 1.1.2
[1507906 refs]
-- running tests for 2.6 plain --
....................................................................................................................................................................................................F..................F...................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................................................F................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.F..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
FAIL: test_invalid (test_errstate.TestErrstate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 20, in test_invalid
AssertionError: Did not raise an invalid error

======================================================================
FAIL: Test that half raises the correct underflows and overflows
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_half.py", line 407, in test_half_fpe
    assert_raises_fpe('invalid', np.divide, float16(np.inf), float16(np.inf))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_half.py", line 15, in assert_raises_fpe
    "Did not raise floating point %s error" % strmatch)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Did not raise floating point invalid error

======================================================================
FAIL: test_divide_err (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 257, in test_divide_err
    self.fail()
AssertionError

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 168, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised

----------------------------------------------------------------------
Ran 4792 tests in 290.814s

FAILED (KNOWNFAIL=5, SKIP=5, failures=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 28 2012, 19:17:01) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
....................................................................................................................................................................................................F..................F...................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................................................F................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.F..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
FAIL: test_invalid (test_errstate.TestErrstate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 20, in test_invalid
AssertionError: Did not raise an invalid error

======================================================================
FAIL: Test that half raises the correct underflows and overflows
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_half.py", line 407, in test_half_fpe
    assert_raises_fpe('invalid', np.divide, float16(np.inf), float16(np.inf))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_half.py", line 15, in assert_raises_fpe
    "Did not raise floating point %s error" % strmatch)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Did not raise floating point invalid error

======================================================================
FAIL: test_divide_err (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 257, in test_divide_err
    self.fail()
AssertionError

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath_complex.py", line 168, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised

----------------------------------------------------------------------
Ran 4792 tests in 527.158s

FAILED (KNOWNFAIL=5, SKIP=5, failures=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 28 2012, 22:22:11) [GCC 4.6.3]
nose version 1.1.2
[1491377 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
....................................................................................................................................................................................................F..................F...................................................................................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................................................F................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K......................K.F............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmprwhr3v.npz'>
  self.fp = None
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
FAIL: test_invalid (test_errstate.TestErrstate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 20, in test_invalid
AssertionError: Did not raise an invalid error

======================================================================
FAIL: Test that half raises the correct underflows and overflows
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_half.py", line 407, in test_half_fpe
    assert_raises_fpe('invalid', np.divide, float16(np.inf), float16(np.inf))
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_half.py", line 15, in assert_raises_fpe
    "Did not raise floating point %s error" % strmatch)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Did not raise floating point invalid error

======================================================================
FAIL: test_divide_err (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 257, in test_divide_err
    self.fail()
AssertionError: None

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "/build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_umath_complex.py", line 168, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised by log

----------------------------------------------------------------------
Ran 4791 tests in 326.607s

FAILED (KNOWNFAIL=6, SKIP=4, failures=4)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-armel-FrUYvh/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Aug 27 2012, 01:54:57) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=armel&ver=1%3A1.7.0~b1-1&stamp=1346468161

Regards,
Sandro

Unpickling can corrupt an internal cache of bytes object (py3)

The Python 3 interpreter has an internal cache of single-byte bytes objects, from which objects are retrieved in a few operations, notably computing length-1 slices of bytes objects. Pickling and unpickling certain arrays can give direct write-access into that cache. A simple way to reproduce the problem is:

>>> a = numpy.array([1], 'b')
>>> b = pickle.loads(pickle.dumps(a))
>>> b[0] = 77
>>> b'\x01  '[0:1]
b'M'

This applies not only to master, but also to released versions, e.g. to Ubuntu 12.04's python3-numpy, which has numpy 1.6.1 and Python 3.2.3.

A similar problem has apparently been encountered before, as the test suite has test_pickle_string_overwrite() in numpy/core/tests/test_regression.py, which triggers the cache corruption but doesn't detect it.

numpy.i bug

Hi,

There seems to be a simple error in numpy.i, (numpy/doc/swig/numpy.i) in lines 1506 and 1529 require_fortran(array) should be !require_fortran(array)

Changes in PyArray_FromAny between 1.5.x and 1.6.x

In Numpy 1.5.x, we have

sage: f = 0.5
sage: f.__array_interface__
{'typestr': '=f8'}
sage: numpy.array(f)
array(0.5)
sage: numpy.array(float(f))
array(0.5)

In 1.6, we get the following,

sage: f = 0.5
sage: f.__array_interface__
{'typestr': '=f8'}
sage: numpy.array(f)
array(0.500000000000000, dtype=object)

This seems to be do to the changes in PyArray_FromAny introduced in
http://github.com/mwhansen/numpy/commit/2635398db3f26529ce2aaea4028a8118844f3c48
. In particular, _array_find_type used to be used to query our
array_interface attribute, and it no longer seems to work.

It should be reproducible with the following minimal example:

class Foo(object):
    def __init__(self, value):
        self.value = value
    def __float__(self):
        return float(self.value)
    @property
    def __array_interface__(self):
        return {'typestr': '=f8'}

f = Foo(0.5)
import numpy
numpy.array(f)

numpy.concatenate fails with array size beyon 2^31

UPDATE: Sorry for making this bug report., it seems the current git version already fixes this.

When the size of to the two arrays being concatenated gets bigger than 2^31,
numpy.concatenate raises "ValueError: negative dimensions are not allowed". The
following is a simple test case.

import numpy as np

N = 2 ** 31 - 1

a = np.empty(N, dtype="b1")
b = np.concatenate(([True], a))

Due to this bug numpy.unique also fails for array sizes greater than 2^31. This
bug has been tested on Python2.7, Numpy version 1.6.2. Thee test system uses linux 64bit.

numpydoc: Attributes on classes not displayed when using both properties and normal attributes

When documenting at the same time properties and normal attributes, nothing is rendered at all.

e.g. in the example below:

class ExampleClass1
    """
    Attributes
    ----------
    prop1
    attr2 : string 
        Some string attribute. 
    """
    @property 
    def prop1(self)
           """ Property 1 docsting """
           pass

The docstring is transformed in the following reST (docscrape_sphinx.py:57,_str_member_list) :

.. rubric:: Attributes

.. autosummary::
   :toctree:

   prop1
==============  ================  ==========
        attr2             string  Some string attribute
==============  ================  ==========

but this is not correct as a newline is missing after "prop1":

GenFromText should be able to read field names from first uncommented line

I have a file (exactly);

# Data from 'Naive Bayes Classifier example' by Eric Meisner November 22, 2003 
# http://www.inf.u-szeged.hu/~ormandi/teaching/mi2/02-naiveBayes-example.pdf 
Color Type Origin Stolen
Red Sports Domestic Yes
Red Sports Domestic No
Red Sports Domestic Yes
Yellow Sports Domestic No
Yellow Sports Imported Yes
Yellow SUV Imported No
Yellow SUV Imported Yes
Yellow SUV Domestic No
Red SUV Imported No
Red Sports Imported Yes

if i give it

a = genfromtxt(filename,dtype=None,names=True,comments='#',skip_header=2)
print a
print a.dtype

it gives:

    [('Red', 'Sports', 'Domestic', 'Yes') ('Red', 'Sports', 'Domestic', 'No')
    ('Red', 'Sports', 'Domestic', 'Yes')
    ('Yellow', 'Sports', 'Domestic', 'No')
    ('Yellow', 'Sports', 'Imported', 'Yes')
    ('Yellow', 'SUV', 'Imported', 'No') ('Yellow', 'SUV', 'Imported', 'Yes')
    ('Yellow', 'SUV', 'Domestic', 'No') ('Red', 'SUV', 'Imported', 'No')
    ('Red', 'Sports', 'Imported', 'Yes')]
    [('Color', '|S6'), ('Type', '|S6'), ('Origin', '|S8'), ('Stolen', '|S3')]

if I only do:

a = genfromtxt(filename,dtype=None,names=True,comments='#')
print a
print a.dtype

I get:

ValueError: Some errors were detected !
    Line #3 (got 4 columns instead of 1)
    Line #4 (got 4 columns instead of 1)
    Line #5 (got 4 columns instead of 1)
    Line #6 (got 4 columns instead of 1)
    Line #7 (got 4 columns instead of 1)
    Line #8 (got 4 columns instead of 1)
    Line #9 (got 4 columns instead of 1)
    Line #10 (got 4 columns instead of 1)
    Line #11 (got 4 columns instead of 1)
    Line #12 (got 4 columns instead of 1)
    Line #13 (got 4 columns instead of 1)

Per my understanding it should be automatically skipped the beginning as those are marked as comments.

Thanks.

1.7.0b1 - Unittest errors building on Debian ia64

Hello,
when building 1.7.0b1 on ia64 the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 79.271s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 31 2012, 09:33:29) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
.............................................................................................................................................................................................................................F.............................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E.............F....................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
FAIL: test_nans_infs (test_half.TestHalf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_half.py", line 76, in test_nans_infs
    assert_equal(np.signbit(self.all_f16), np.signbit(self.all_f32))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 1.56097412109%)
 x: array([False, False, False, ...,  True,  True,  True], dtype=bool)
 y: array([False, False, False, ..., False, False, False], dtype=bool)

======================================================================
FAIL: test_umath.test_copysign
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1108, in test_copysign
    assert_(np.signbit(np.copysign(np.nan, -1)))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError

----------------------------------------------------------------------
Ran 4792 tests in 196.864s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4, failures=2)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 31 2012, 08:06:43) [GCC 4.6.3]
nose version 1.1.2
[1583234 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4792 tests in 74.259s

FAILED (KNOWNFAIL=5, SKIP=5, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 22:41:49) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
.............................................................................................................................................................................................................................F.............................................................................S.............................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E.............F....................................K......................K.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 1986, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

======================================================================
FAIL: test_nans_infs (test_half.TestHalf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_half.py", line 76, in test_nans_infs
    assert_equal(np.signbit(self.all_f16), np.signbit(self.all_f32))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 1.56097412109%)
 x: array([False, False, False, ...,  True,  True,  True], dtype=bool)
 y: array([False, False, False, ..., False, False, False], dtype=bool)

======================================================================
FAIL: test_umath.test_copysign
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1108, in test_copysign
    assert_(np.signbit(np.copysign(np.nan, -1)))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError

----------------------------------------------------------------------
Ran 4792 tests in 178.227s

FAILED (KNOWNFAIL=5, SKIP=5, errors=4, failures=2)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 26 2012, 00:16:56) [GCC 4.6.3]
nose version 1.1.2
[1566681 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
...........................................................................................................................................................................................................................................................................................................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K........................................E.E..............................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K......................K................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................/usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmprfhld_.npz'>
  self.fp = None
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose([1e-08, 1, 1000020.0000000099], [0, nan, 1000000.0])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: test_numeric.TestIsclose.test_ip_isclose_allclose(nan, [nan, nan, nan])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_numeric.py", line 1245, in tst_isclose_allclose
    assert_array_equal(isclose(x, y).all(), allclose(x, y), msg % (x, y))
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/numeric.py", line 1987, in allclose
    return all(less_equal(abs(x-y), atol + rtol * abs(y)))
RuntimeWarning: invalid value encountered in absolute

======================================================================
ERROR: Test a special case for var
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/tests/test_core.py", line 2735, in test_varstd_specialcases
    _ = method(out=nout)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 4778, in std
    dvar = sqrt(dvar)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 849, in __call__
    m |= self.domain(d)
  File "/build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/ma/core.py", line 801, in __call__
    return umath.less(x, self.critical_value)
RuntimeWarning: invalid value encountered in less

----------------------------------------------------------------------
Ran 4791 tests in 88.456s

FAILED (KNOWNFAIL=6, SKIP=4, errors=3)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-ia64-TtoBKn/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Aug 26 2012, 22:41:40) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=ia64&ver=1%3A1.7.0~b1-1&stamp=1346422426

Regards,
Sandro

Bug in sorting structured numpy array with more than 2^31 elements

When using structured arrays of size more than 2^31, sorting doesn't work. The
sort function returns immediately without sorting. Following is a simple test
case.

import numpy as np

dt = "u4, u4"
a = np.empty(2 ** 31, dtype=dt)
a["f0"][:] = np.random.randint(1, 1e9, 2 ** 31)
a["f1"][:] = np.random.randint(1, 1e9, 2 ** 31)

a.sort(order=["f0", "f1"])
for i in xrange(len(a) -1):
    u1, v1 = a[i]
    u2, v2 = a[i + 1]

    assert u1 < u2 or (u1 == u2 and v1 <= v2)

The above has been tested using Python 2.7 and Numpy version 1.6.2 as well as
the Numpy Git version a72ce7e. The test was done on a 64bit linux system with
48G of memory.

Faster column_stack?

I was experimenting with a faster version of column_stack, and came up with this:

def column_stack2(cols):
    """Faster version of numpy.column_stack."""
    rows = len(cols[0])
    assert all(len(col) == rows for col in cols)
    data = np.empty((rows, len(cols)))
    for i, d in enumerate(cols):
        data[:,i] = d
    return data

It seems to be about 50% faster -- is there a drawback to doing it this way, or is this approach better?

1.7.0b1 - Unittest errors building on Debian kfreebsd-i386

Hello,
when building 1.7.0b1 on Debian unstable kfreebsd-i386 the tests suite returns some error:

-- running tests for 2.7 plain --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
----------------------------------------------------------------------
Ran 4764 tests in 25.392s

OK (KNOWNFAIL=5, SKIP=9)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 13:49:11) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 2.7 debug --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4764 tests in 50.646s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 13:52:04) [GCC 4.7.1]
nose version 1.1.2
[1658923 refs]
-- running tests for 2.6 plain --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
----------------------------------------------------------------------
Ran 4764 tests in 23.868s

OK (KNOWNFAIL=5, SKIP=9)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 22:48:16) [GCC 4.7.0]
nose version 1.1.2
-- running tests for 2.6 debug --
...........................................................................................................................................................................................................................................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS...............................................................................................................................................................................................................................................................................................................K.................................................E..................................................K...SK.S.......S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_power_zero (test_umath.TestPower)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 139, in test_power_zero
    assert_complex_equal(np.power(zero, 0+1j), cnan)
RuntimeWarning: invalid value encountered in power

----------------------------------------------------------------------
Ran 4764 tests in 45.545s

FAILED (KNOWNFAIL=5, SKIP=9, errors=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 23:35:49) [GCC 4.7.0]
nose version 1.1.2
[1642465 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
...........................................................................................................................................................................................................................................................................................................S.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS..........................................................................................K....................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmphc84d1.npz'>
  self.fp = None
.................................................................................................................................................................................................................S.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F................................................................K....................................................
======================================================================
FAIL: test_pareto (test_random.TestRandomDist)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/random/tests/test_random.py", line 363, in test_pareto
    np.testing.assert_array_almost_equal(actual, desired, decimal=15)
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 811, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 15 decimals

(mismatch 100.0%)
 x: array([[  2.46852460e+03,   1.41286881e+03],
       [  5.28287797e+07,   6.57720981e+07],
       [  1.40840323e+02,   1.98390255e+05]])
 y: array([[  2.46852460e+03,   1.41286881e+03],
       [  5.28287797e+07,   6.57720981e+07],
       [  1.40840323e+02,   1.98390255e+05]])

----------------------------------------------------------------------
Ran 4763 tests in 38.711s

FAILED (KNOWNFAIL=6, SKIP=8, failures=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-kfreebsd-i386-T39GUN/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Aug 27 2012, 11:15:49) [GCC 4.7.1]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=kfreebsd-i386&ver=1%3A1.7.0~b1-1&stamp=1346418853

Regards,
Sandro

TODO list for the 1.7.0 release

This issue is to track what needs to be done before the 1.7.0 release. I will just be updating the text here.

Issues to work on

Issues to fix:

http://projects.scipy.org/numpy/ticket/2108
#378, #392 (see Nathaniel's comment below)
#394
#424
#426
#438
#294
#291
#464

Also we need to fix all Debian build issues:
#406, #407, #408, #409, #410, #411, #412, #413, #414, #415

Access to SPARC 64 needed for:

http://projects.scipy.org/numpy/ticket/2076

Fixed Issues that need to be merged

Work is done here, it just needs to get reviewed & merged, or more discussion needed.

Issues that need clarification:

http://projects.scipy.org/numpy/ticket/2150
http://projects.scipy.org/numpy/ticket/2101

Issues + PRs that need merging:
#2696 (this is a PR against maintenance-1.7.x)

Fixed

These are fixed, but not yet back-ported to the 1.7.x branch.
#459
#2707

Backported

All these PRs are fixed in master and back-ported to the 1.7.x branch (left here for reference).

http://projects.scipy.org/numpy/ticket/2185 (PR: #395)
http://projects.scipy.org/numpy/ticket/2066 (PR: #397)
http://projects.scipy.org/numpy/ticket/2189 (PR: #397)
http://projects.scipy.org/numpy/ticket/2187 (PR: #401)
http://projects.scipy.org/numpy/ticket/1588 (PR: #405)
#416 (PR: #417)
#376
#404
#390

eebd7b2
#432
#429
#431
#430
#399
#420
#451
#440 (this adds a deprecation, so I guess it also needs a short mention added to the release notes)
#449

The above 4 issues are backported by #472.

BUG: format(numpy.void("ABC"),"") throws a RuntimeError

Using version 1.6.2. Stumbled upon this issue while using format on indexed record arrays.

>>> import numpy
>>> numpy.__version__
'1.6.2'
>>> format(numpy.void("ABC"), "")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded while calling a Python object

np.insert fails with float32, float64 input

Namely

import numpy as np
the_b = np.array([0, 1], dtype=np.float64)
np.insert(the_b, 0, the_b[0])

returns

TypeError                                 Traceback (most recent call last)
<ipython-input-5-0485713e6087> in <module>()
      1 the_b = np.array([0, 1], dtype=np.float64)
----> 2 np.insert(the_b, 0, the_b[0])

/Users/gio/.local/lib/python2.7/site-packages/numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg/numpy/lib/function_base.pyc in insert(arr, obj, values, axis)
   3603             obj = [obj]
   3604         else:
-> 3605             obj = [obj] * len(values)
   3606 
   3607 

TypeError: object of type 'numpy.float64' has no len()

because insert has a isinstance that does not check for float32, float64, but only for int, long, integer:

        if isinstance(values, (int, long, integer)):
            obj = [obj]
        else:
            obj = [obj] * len(values)

Changing it to

        if isinstance(values, (int, long, integer, numpy.float32, numpy.float64)):
            obj = [obj]
        else:
            obj = [obj] * len(values)

seems only an half-assed solution though.

EDIT: forgot to mention that I'm using numpy-1.8.0.dev_f2f0ac0_20120725-py2.7-macosx-10.8-x86_64.egg.

EDIT2: Probably a better solution for the isinstance part would be the following

        try:
            len(values)
            obj = [obj] * len(values)
        except TypeError:
             values + 2  # TypeError should be raised here if values is not a number
             obj = [obj]

Indexing columns of an empty numpy array could return an empty numpy array

I have a function that returns a numpy array of key/value pairs or an empty numpy array and wish to access the keys/values using slice notation with columns. My issue is that when I have an empty numpy array, column indexing throws exceptions.

In [258]: np.array([(1,10),(2,20),(3,30)])[:]
Out[258]: 
array([[ 1, 10],
       [ 2, 20],
       [ 3, 30]])

In [259]: np.array([(1,10),(2,20),(3,30)])[:,0]
Out[259]: array([1, 2, 3])

In [260]: np.array([(1,10),(2,20),(3,30)])[:,1]
Out[260]: array([10, 20, 30])

# Good exception
In [261]: np.array([(1,10),(2,20),(3,30)])[:,2]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-261-ffe36d8d8f9b> in <module>()
----> 1 np.array([(1,10),(2,20),(3,30)])[:,2]

IndexError: invalid index

For empty numpy arrays, indexing columns breaks:

In [262]: np.array([])[:]
Out[262]: array([], dtype=float64)

# Bad exception
In [263]: np.array([])[:,0]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-263-0e22e1004880> in <module>()
----> 1 np.array([])[:,0]

IndexError: invalid index

Also, returning all the columns has a similar behavior for an empty array.

# Return all the columns
In [269]: np.array([(1,2),(3,4)])[:,:]
Out[269]: 
array([[1, 2],
       [3, 4]])

# Bad exception
In [272]: np.array([])[:,:]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-272-c508f157c3df> in <module>()
----> 1 np.array([])[:,:]

IndexError: too many indices

Indexing any column of an empty numpy array could return an empty numpy array instead of throwing an Invalid index exception, and likewise in the case of returning all the columns.

Segault in Python 3.2 in Wine

I didn't have time to investigate yet, so I am just posting it here so that I remember:

$ wine "C:\Python32\python" 
Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.test()
Running unit tests for numpy
NumPy version 1.7.0.dev-Unknown
NumPy is installed in C:\Python32\lib\site-packages\numpy
Python version 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]
nose version 1.1.2
C:\Python32\lib\site-packages\nose-1.1.2-py3.2.egg\nose\core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Python32\\lib\\site-packages\\nose-1.1.2-py3.2.egg\\nose\\usage.txt' mode='r' encoding='cp1252'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..............S.........S..................E..............................................................................Assertion failed: PyBytes_Check(temp), file numpy\core\src\multiarray\common.c, line 161

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
wine: Unhandled exception 0x40000015 at address 0x64fe0023:0x785911c5 (thread 0024), starting debugger...
Process of pid=0023 has terminated
No process loaded, cannot execute 'echo Modules:'
Cannot get info on module while no process is loaded
No process loaded, cannot execute 'echo Threads:'
process  tid      prio (all id:s are in hex)
0000000e services.exe
    0000001e    0
    0000001d    0
    00000015    0
ondrej@hawk:/tmp$   00000010    0
    0000000f    0
00000012 winedevice.exe
    0000001b    0
    00000018    0
    00000014    0
    00000013    0
00000019 plugplay.exe
    00000020    0
    0000001c    0
    0000001a    0
00000027 explorer.exe
    00000028    0
winedbg: Internal crash at 0x7ed6b29a

1.7.0b1 - Unittest errors building on Debian powerpc

Hello,
when building 1.7.0b1 on Debian unstable powerpc the tests suite returns some error:

-- running tests for 2.7 plain --
.............................................................................................................................................................................................................E.............................................................................................S...................................................................................................................................S........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................................................................................................K.........................................................................................................................................................................................SSS..............................................................................................................................................................................................................................................................................E.........................K......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_singleton (test_getlimits.TestLongdouble)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_getlimits.py", line 38, in test_singleton
    ftype = finfo(longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
ERROR: Failure: RuntimeWarning (overflow encountered in add)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 833, in <module>
    class TestComplexFunctions(object):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1019, in TestComplexFunctions
    @dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 829, in is_longdouble_finfo_bogus
    info = np.finfo(np.longcomplex)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
FAIL: test_nditer.test_iter_buffered_cast_byteswapped_complex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_nditer.py", line 1651, in test_iter_buffered_cast_byteswapped_complex
    assert_equal(a, 2*np.arange(10, dtype=np.clongdouble) + 4j)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([ 0.0+2.0553131e-320j,  5.4739487e-303+2.0553131e-320j,
        5.6961891e-306+2.0553131e-320j,  1.8797424e-304+2.0553131e-320j,
        3.7025229e-304+2.0553131e-320j,  4.6139132e-304+2.0553131e-320j,...
 y: array([ 0.0+4.0j,  2.0+4.0j,  4.0+4.0j,  6.0+4.0j,  8.0+4.0j,  10.0+4.0j,
        12.0+4.0j,  14.0+4.0j,  16.0+4.0j,  18.0+4.0j], dtype=complex256)

----------------------------------------------------------------------
Ran 4692 tests in 40.433s

FAILED (KNOWNFAIL=4, SKIP=5, errors=2, failures=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 14:59:52) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.7 debug --
.............................................................................................................................................................................................................E.............................................................................................S...................................................................................................................................S........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................................................................................................K.........................................................................................................................................................................................SSS..............................................................................................................................................................................................................................................................................E.........................K......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_singleton (test_getlimits.TestLongdouble)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_getlimits.py", line 38, in test_singleton
    ftype = finfo(longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
ERROR: Failure: RuntimeWarning (overflow encountered in add)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 833, in <module>
    class TestComplexFunctions(object):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 1019, in TestComplexFunctions
    @dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_umath.py", line 829, in is_longdouble_finfo_bogus
    info = np.finfo(np.longcomplex)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
FAIL: test_nditer.test_iter_buffered_cast_byteswapped_complex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/core/tests/test_nditer.py", line 1651, in test_iter_buffered_cast_byteswapped_complex
    assert_equal(a, 2*np.arange(10, dtype=np.clongdouble) + 4j)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([ 0.0+2.0553131e-320j,  5.4739487e-303+2.0553131e-320j,
        5.6961891e-306+2.0553131e-320j,  1.8797424e-304+2.0553131e-320j,
        3.7025229e-304+2.0553131e-320j,  4.6139132e-304+2.0553131e-320j,...
 y: array([ 0.0+4.0j,  2.0+4.0j,  4.0+4.0j,  6.0+4.0j,  8.0+4.0j,  10.0+4.0j,
        12.0+4.0j,  14.0+4.0j,  16.0+4.0j,  18.0+4.0j], dtype=complex256)

----------------------------------------------------------------------
Ran 4692 tests in 114.895s

FAILED (KNOWNFAIL=4, SKIP=5, errors=2, failures=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.7/dist-packages/numpy
Python version 2.7.3 (default, Aug 26 2012, 14:01:10) [GCC 4.6.3]
nose version 1.1.2
[1474985 refs]
-- running tests for 2.6 plain --
.............................................................................................................................................................................................................E.............................................................................................S...................................................................................................................................S......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K.........................................................................................................................................................................................SSS..............................................................................................................................................................................................................................................................................E.........................K......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_singleton (test_getlimits.TestLongdouble)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_getlimits.py", line 38, in test_singleton
    ftype = finfo(longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
ERROR: Failure: RuntimeWarning (overflow encountered in add)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 833, in <module>
    class TestComplexFunctions(object):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1019, in TestComplexFunctions
    @dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 829, in is_longdouble_finfo_bogus
    info = np.finfo(np.longcomplex)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

----------------------------------------------------------------------
Ran 4692 tests in 40.272s

FAILED (KNOWNFAIL=4, SKIP=5, errors=2)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 22:41:43) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 2.6 debug --
.............................................................................................................................................................................................................E.............................................................................................S...................................................................................................................................S........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................................................................................................K.........................................................................................................................................................................................SSS..............................................................................................................................................................................................................................................................................E.........................K......................K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_singleton (test_getlimits.TestLongdouble)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_getlimits.py", line 38, in test_singleton
    ftype = finfo(longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
ERROR: Failure: RuntimeWarning (overflow encountered in add)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.6/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 833, in <module>
    class TestComplexFunctions(object):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 1019, in TestComplexFunctions
    @dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_umath.py", line 829, in is_longdouble_finfo_bogus
    info = np.finfo(np.longcomplex)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
FAIL: test_nditer.test_iter_buffered_cast_byteswapped_complex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/tests/test_nditer.py", line 1651, in test_iter_buffered_cast_byteswapped_complex
    assert_equal(a, 2*np.arange(10, dtype=np.clongdouble) + 4j)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([ 0.0+2.0553131e-320j,  5.4739487e-303+2.0553131e-320j,
        5.6961891e-306+2.0553131e-320j,  1.8797424e-304+2.0553131e-320j,
        3.7025229e-304+2.0553131e-320j,  4.6139132e-304+2.0553131e-320j,...
 y: array([ 0.0+4.0j,  2.0+4.0j,  4.0+4.0j,  6.0+4.0j,  8.0+4.0j,  10.0+4.0j,
        12.0+4.0j,  14.0+4.0j,  16.0+4.0j,  18.0+4.0j], dtype=complex256)

----------------------------------------------------------------------
Ran 4692 tests in 105.265s

FAILED (KNOWNFAIL=4, SKIP=5, errors=2, failures=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python2.6/dist-packages/numpy
Python version 2.6.8 (unknown, Jun 25 2012, 23:41:12) [GCC 4.6.3]
nose version 1.1.2
[1458442 refs]
# Python 3.2 maps to python3/ dir alone? bah
for v in 3.2 ; do \
        echo "-- running tests for "$v" plain --" ; \
        python$v -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
        echo "-- running tests for "$v" debug --" ; \
        python$v-dbg -c "import sys ; sys.path.insert(0, '/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \
    done
-- running tests for 3.2 plain --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
.............................................................................................................................................................................................................E.............................................................................................S...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................................................................................................K.........................................................................................................................................................................................SSS..........................................................................................K...................................................................................................................................................................................E.........................K......................K................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................/usr/lib/python3.2/zipfile.py:1317: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmplu5hdb.npz'>
  self.fp = None
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................
======================================================================
ERROR: test_singleton (test_getlimits.TestLongdouble)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_getlimits.py", line 38, in test_singleton
    ftype = finfo(longdouble)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
ERROR: Failure: RuntimeWarning (overflow encountered in add)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_umath.py", line 833, in <module>
    class TestComplexFunctions(object):
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_umath.py", line 1019, in TestComplexFunctions
    @dec.knownfailureif(is_longdouble_finfo_bogus(), "Bogus long double finfo")
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_umath.py", line 829, in is_longdouble_finfo_bogus
    info = np.finfo(np.longcomplex)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/getlimits.py", line 119, in __new__
    obj = object.__new__(cls)._init(dtype)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/getlimits.py", line 149, in _init
    'numpy %s precision floating point number' % precname)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/machar.py", line 110, in __init__
    self._do_init(float_conv, int_conv, float_to_float, float_to_str, title)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/machar.py", line 125, in _do_init
    a = a + a
RuntimeWarning: overflow encountered in add

======================================================================
FAIL: test_nditer.test_iter_buffered_cast_byteswapped_complex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/core/tests/test_nditer.py", line 1651, in test_iter_buffered_cast_byteswapped_complex
    assert_equal(a, 2*np.arange(10, dtype=np.clongdouble) + 4j)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 718, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 644, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([ 0.0+2.0553131e-320j,  5.4739487e-303+2.0553131e-320j,
        5.6961891e-306+2.0553131e-320j,  1.8797424e-304+2.0553131e-320j,
        3.7025229e-304+2.0553131e-320j,  4.6139132e-304+2.0553131e-320j,...
 y: array([ 0.0+4.0j,  2.0+4.0j,  4.0+4.0j,  6.0+4.0j,  8.0+4.0j,  10.0+4.0j,
        12.0+4.0j,  14.0+4.0j,  16.0+4.0j,  18.0+4.0j], dtype=complex256)

----------------------------------------------------------------------
Ran 4691 tests in 51.947s

FAILED (KNOWNFAIL=5, SKIP=4, errors=2, failures=1)
Running unit tests for numpy
NumPy version 1.7.0b1
NumPy is installed in /build/buildd-python-numpy_1.7.0~b1-1-powerpc-b8azze/python-numpy-1.7.0~b1/debian/tmp/usr/lib/python3/dist-packages/numpy
Python version 3.2.3 (default, Jul 14 2012, 00:40:39) [GCC 4.6.3]
nose version 1.1.2
-- running tests for 3.2 debug --
/usr/lib/python3/dist-packages/nose/core.py:247: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/lib/python3/dist-packages/nose/usage.txt' mode='r' encoding='ANSI_X3.4-1968'>
  os.path.dirname(__file__), 'usage.txt'), 'r').read()
..........................................................................................................................python3.2-dbg: numpy/core/src/multiarray/common.c:161: PyArray_DTypeFromObjectHelper: Assertion `((((((PyObject*)(temp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
Aborted

Full build log is available at: https://buildd.debian.org/status/fetch.php?pkg=python-numpy&arch=powerpc&ver=1%3A1.7.0~b1-1&stamp=1346419716

Regards,
Sandro

numpy.load documentation regarding gzip compression does not match implementation

The documentation of numpy.load indicates "If the filename extension is .gz, the file is first decompressed." Contrary to numpy.loadtxt, however, numpy.load does not seem to check the extension, but rather whether the file object is an instance of 'gzip.GzipFile' (see https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L360)

The following example seems to be correct according to the documentation, but fails in practice:

>>> import numpy
>>> numpy.load('foo.npy.gz')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/numpy/lib/npyio.py", line 359, in load
    "Failed to interpret file %s as a pickle" % repr(file)
IOError: Failed to interpret file 'foo.npy.gz' as a pickle

The easy solution is to update the documentation to reflect this behavior, though I believe it would be preferable to correct the implementation instead (I can prepare a patch if requested).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.