New issue 2655: Pypy + Aubio 3 or 4 numpy bugs https://bitbucket.org/pypy/pypy/issues/2655/pypy-aubio-3-or-4-numpy-bugs
Stuart Axon: I've been testing PyPy nightly and aubio, and quite a bit seems to work. There are some numpy tests that don't pass in test_cvec.py - it looks like there are only about 3 or 4 actual errors. In my virtualenv I had to set ```LD_LIBRARY_PATH=$(python-config --prefix)/lib``` After I had built and aubio I ran the python tests: ``` $ cd aubio/python/tests $ ./run_all_tests .......................sssss..................................sssssssssss...FEEE.EE..FFEFEE...........................................................................................................................................................................................................................................................................................................................................................sssssssss............................................................................. ====================================================================== ERROR: test_assign_norm_too_small (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 90, in test_assign_norm_too_small b = fvec(512//2+1 - 4) File "build/bdist.linux-x86_64/egg/aubio/__init__.py", line 17, in __new__ return numpy.zeros(input_arg, dtype=float_type, **kwargs) SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_assign_phas_too_large (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 96, in test_assign_phas_too_large b = fvec(512//2+1 + 4) File "build/bdist.linux-x86_64/egg/aubio/__init__.py", line 17, in __new__ return numpy.zeros(input_arg, dtype=float_type, **kwargs) SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_assign_phas_too_small (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 102, in test_assign_phas_too_small b = fvec(512//2+1 - 4) File "build/bdist.linux-x86_64/egg/aubio/__init__.py", line 17, in __new__ return numpy.zeros(input_arg, dtype=float_type, **kwargs) SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_pass_to_numpy (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 72, in test_pass_to_numpy assert_equal(norm, new_spec.norm) File "/mnt/data/home/stu/projects/external/aubio/.eggs/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/testing/utils.py", line 343, in assert_equal return assert_array_equal(actual, desired, err_msg, verbose) File "/mnt/data/home/stu/projects/external/aubio/.eggs/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/testing/utils.py", line 854, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/mnt/data/home/stu/projects/external/aubio/.eggs/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/testing/utils.py", line 720, in assert_array_compare x_isnan, y_isnan = isnan(x), isnan(y) SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_vector_assign_element (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 21, in test_vector_assign_element a.norm[0] = 1 ValueError: input array has length 261, but cvec has length 257 ====================================================================== ERROR: test_set_norm_with_scalar_array (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 126, in test_set_norm_with_scalar_array a.norm = np.ndarray(1, dtype = 'int') SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_set_norm_with_wrong_float_array (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 136, in test_set_norm_with_wrong_float_array a.norm = np.zeros(512//2+1, dtype = wrong_type) SystemError: Function returned a NULL result without setting an exception ====================================================================== ERROR: test_wrong_length (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 116, in test_wrong_length cvec(-1) SystemError: Function returned a NULL result without setting an exception ====================================================================== FAIL: test_assign_norm_too_large (python.tests.test_cvec.aubio_cvec_test_case) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 86, in test_assign_norm_too_large a.norm = b AssertionError: ValueError not raised ====================================================================== FAIL: test_set_norm_with_int_array (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 131, in test_set_norm_with_int_array a.norm = np.zeros(512//2+1, dtype = 'int') AssertionError: ValueError not raised ====================================================================== FAIL: test_set_norm_with_scalar (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 121, in test_set_norm_with_scalar a.norm = 1 AssertionError: ValueError not raised ====================================================================== FAIL: test_set_norm_with_wrong_2d_array (python.tests.test_cvec.aubio_cvec_wrong_norm_input) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/data/home/stu/projects/external/aubio/python/tests/test_cvec.py", line 141, in test_set_norm_with_wrong_2d_array a.norm = np.zeros((512//2+1, 2), dtype = float_type) AssertionError: ValueError not raised ---------------------------------------------------------------------- Ran 524 tests in 1.182s FAILED (failures=4, errors=8, skipped=25) ``` _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue