From 9c1d5538b5bf8682b82f0290615d3e9d7f97d746 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 20 Aug 2014 12:39:40 -0600 Subject: ENH: Move vdot to multiarray. Remove vdot from _dotblas and implement it in multiarray. Remove the files in core/blasdot as they are no longer needed. Fix tests and build to reflect the changes. The vdot function is now a bit faster in the common case as ravel is used instead of flatten. There is also no need to conjugate the files for clongdouble. --- numpy/core/numeric.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 8db3705f7..e472f1d3f 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1077,26 +1077,9 @@ def outer(a, b, out=None): # try to import blas optimized dot if available envbak = os.environ.copy() -try: - # disables openblas affinity setting of the main thread that limits - # python threads or processes to one core - if 'openblas_main_free' not in os.environ: - os.environ['openblas_main_free'] = '1' - if 'gotoblas_main_free' not in os.environ: - os.environ['gotoblas_main_free'] = '1' - from ._dotblas import vdot -except ImportError: - # docstrings are in add_newdocs.py - inner = multiarray.inner - def vdot(a, b): - return dot(asarray(a).ravel().conj(), asarray(b).ravel()) -finally: - os.environ.clear() - os.environ.update(envbak) - del envbak - dot = multiarray.dot inner = multiarray.inner +vdot = multiarray.vdot def alterdot(): warnings.warn("alterdot no longer does anything.", DeprecationWarning) -- cgit v1.2.1