<p dir="auto">I've been trying to get numpy working with Intel's MKL math library without much success.</p>
<p dir="auto">The first problem was convincing numpy's build process to use MKL even though I have openblas installed on my system  The problem is in <code class="notranslate">distutils/system_info.py</code> checks for the existence of openblas before checking whether MKL is configured.  Checking MKL first resolved that issue (I can submit a patch if you're interested).</p>
<p dir="auto">That leads to the second problem.  When linked with MKL, numpy fails several of it's tests.  Specifically:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision(&lt;class 'numpy.complex64'&gt;,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/nose/case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1634, in check_loss_of_precision
    check(x_series, 2.1*eps)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision(&lt;class 'numpy.complex128'&gt;,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/nose/case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1634, in check_loss_of_precision
    check(x_series, 2.1*eps)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision_longcomplex
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/nose/case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/decorators.py&quot;, line 216, in knownfailer
    return f(*args, **kwargs)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1681, in test_loss_of_precision_longcomplex
    self.check_loss_of_precision(np.longcomplex)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1632, in check_loss_of_precision
    check(x_series, 50*eps)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py&quot;, line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_scripts.test_f2py
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/nose/case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/decorators.py&quot;, line 146, in skipper_func
    return f(*args, **kwargs)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/tests/test_scripts.py&quot;, line 68, in test_f2py
    code, stdout, stderr = run_command([f2py_cmd, '-v'])
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/tests/test_scripts.py&quot;, line 48, in run_command
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
  File &quot;/home/malouf/python/lib/python3.5/subprocess.py&quot;, line 950, in __init__
    restore_signals, start_new_session)
  File &quot;/home/malouf/python/lib/python3.5/subprocess.py&quot;, line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'f2py3.5'

======================================================================
FAIL: test_accelerate_framework_sgemv_fix (test_multiarray.TestDot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py&quot;, line 4275, in test_accelerate_framework_sgemv_fix
    assert_dot_close(A_f, X_f, desired)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py&quot;, line 4260, in assert_dot_close
    assert_allclose(np.dot(A, X), desired, rtol=1e-5, atol=1e-7)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 1347, in assert_allclose
    verbose=verbose, header=header)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-05, atol=1e-07

(mismatch 62.68%)
 x: array([ 163.433014,  144.792694,  145.528854, ...,  103.144707,
         94.63633 ,   98.819527], dtype=float32)
 y: array([  54.477672,   48.264233,   48.50962 , ...,  103.144708,
         94.636337,  148.229279])

======================================================================
FAIL: test_dot_3args (test_multiarray.TestDot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py&quot;, line 4171, in test_dot_3args
    assert_array_equal(r2, r)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 782, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 39.74609375%)
 x: array([  7.675112,  11.017172,   5.982513, ...,  14.025107,  14.226657,
        20.369611])
 y: array([ 11.512668,  16.525758,   8.973769, ...,  14.025107,  14.226657,
        20.369611])

======================================================================
FAIL: test_polyfit_build (test_regression.TestRegression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/lib/tests/test_regression.py&quot;, line 111, in test_polyfit_build
    assert_array_almost_equal(ref, tested)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 886, in assert_array_almost_equal
    precision=decimal)
  File &quot;/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py&quot;, line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: array([ -1.061238e-06,   5.708869e-04,  -1.138220e-01,   9.953682e+00,
        -3.145265e+02])
 y: array([ 0.003459, -0.012066,  0.046189, -0.349192,  0.086812])"><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision(&lt;class 'numpy.complex64'&gt;,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1634, in check_loss_of_precision
    check(x_series, 2.1*eps)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision(&lt;class 'numpy.complex128'&gt;,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1634, in check_loss_of_precision
    check(x_series, 2.1*eps)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_umath.TestComplexFunctions.test_loss_of_precision_longcomplex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/decorators.py", line 216, in knownfailer
    return f(*args, **kwargs)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1681, in test_loss_of_precision_longcomplex
    self.check_loss_of_precision(np.longcomplex)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1632, in check_loss_of_precision
    check(x_series, 50*eps)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_umath.py", line 1603, in check
    d = np.absolute(np.arcsinh(x)/np.arcsinh(z).real - 1)
RuntimeWarning: divide by zero encountered in true_divide

======================================================================
ERROR: test_scripts.test_f2py
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/tests/test_scripts.py", line 68, in test_f2py
    code, stdout, stderr = run_command([f2py_cmd, '-v'])
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/tests/test_scripts.py", line 48, in run_command
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
  File "/home/malouf/python/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/home/malouf/python/lib/python3.5/subprocess.py", line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'f2py3.5'

======================================================================
FAIL: test_accelerate_framework_sgemv_fix (test_multiarray.TestDot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py", line 4275, in test_accelerate_framework_sgemv_fix
    assert_dot_close(A_f, X_f, desired)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py", line 4260, in assert_dot_close
    assert_allclose(np.dot(A, X), desired, rtol=1e-5, atol=1e-7)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 1347, in assert_allclose
    verbose=verbose, header=header)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-05, atol=1e-07

(mismatch 62.68%)
 x: array([ 163.433014,  144.792694,  145.528854, ...,  103.144707,
         94.63633 ,   98.819527], dtype=float32)
 y: array([  54.477672,   48.264233,   48.50962 , ...,  103.144708,
         94.636337,  148.229279])

======================================================================
FAIL: test_dot_3args (test_multiarray.TestDot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/core/tests/test_multiarray.py", line 4171, in test_dot_3args
    assert_array_equal(r2, r)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 782, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 39.74609375%)
 x: array([  7.675112,  11.017172,   5.982513, ...,  14.025107,  14.226657,
        20.369611])
 y: array([ 11.512668,  16.525758,   8.973769, ...,  14.025107,  14.226657,
        20.369611])

======================================================================
FAIL: test_polyfit_build (test_regression.TestRegression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/lib/tests/test_regression.py", line 111, in test_polyfit_build
    assert_array_almost_equal(ref, tested)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 886, in assert_array_almost_equal
    precision=decimal)
  File "/home/malouf/python/lib/python3.5/site-packages/numpy/testing/utils.py", line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: array([ -1.061238e-06,   5.708869e-04,  -1.138220e-01,   9.953682e+00,
        -3.145265e+02])
 y: array([ 0.003459, -0.012066,  0.046189, -0.349192,  0.086812])
</code></pre></div>
<p dir="auto">I don't even know where to begin to isolate the problem.  Has anyone reported this before?  What other information would be helpful?  I'm using numpy 1.10.1, python 3.5.0, gcc 4.8.3, MKL 11.3.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="604273559" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/16036" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/16036/hovercard" href="https://github.com/numpy/numpy/issues/16036">#16036</a> reports downstream issues due to backwards-incompatible changes to classes in <code class="notranslate">numpy.core.arrayprint</code>. Based on the lack of docstrings etc. it seems that some functionality in arrayprint was not necessarily intended to be public. It would be good to review this and perhaps provide some more concrete guidance to users.</p>
<p dir="auto">Incompatible changes introduced in e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="269430256" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/9941" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/9941/hovercard" href="https://github.com/numpy/numpy/pull/9941">#9941</a></p>