0

I'm new to Python so fingers crossed this is a simple error!

When running the following code from an anaconda prompt I get an error;

python -c "import numpy; numpy.test()"

The error message is;

FAIL: test_error_message (test_utils.TestEqual)

More information that's way over my head;

File "C:\ProgramData\Anaconda22\lib\site-packages\numpy\testing\tests\test_utils.py", line 272, in test_error_message
    "\nArrays are not equal\n\n"
AssertionError: '\nArrays are not equal\n\n(shapes (2L,), (1L, 2L) mismatch)\n x: array([1, 2])\n y: [repr failed for <matrix>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()]' != '\nArrays are not equal\n\n(shapes (2,), (1, 2) mismatch)\n x: array([1, 2])\n y: [repr failed for <matrix>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()]'

I literally have no idea how to fix this. Any suggestions?

1 Answer 1

1

OK so I'm not sure why this worked but I uninstalled Numpy using;

conda uninstall numpy

Then reinstalled numpy with;

conda install numpy

Then reinstalled all the packages that were uninstalled when numpy was uninstalled;

conda install astropy bottleneck dask datashape distributed h5py matplotlib numba numexpr numpy odo pandas patsy pygpu pytables pywavelets scikit-image scikit-learn scipy seaborn statsmodels theano 

Bingo bango, no more failures!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.