ENH: add subok flag to stride_tricks (and thus broadcast_arrays)
Convert as_strided input to array first
DOC: warn about using a set with 'in1d'.
Add NULL check after malloc() in fortranobject.c
DOC: added doc for argmin
Changed the `goto fail` to a `return PyErr_NoMemory()`
ENH: Add 'HAVE_CBLAS' macro for build purposes.

The current system works for MKL and OpenBLAS by default because the
mkl_info and openblas_info classes in numpy/distutils/system_info do not
define the macro 'NO_ATLAS_INFO=1' that currently signals the absence of
CBLAS. This PR declares the presence of CBLAS directly by defining the
'HAVE_CBLAS' macro.
ENH: When cblas is available use it in descr->f->dot.

Importing _dotblas currently executes _dotblas.alterdot, which replaces
the default descr->f->dot function with a cblas based version for float,
double, complex float, and complex double data types. This PR changes
the default descr->f->dot to use cblas whenever it is available. After
this change, the alterdot and restoredot functions serve no purpose, so
are changed to do nothing and deprecated. Note that those functions were
already doing nothing when _dotblas was not available.
MAINT, STY: Remove use of alterdot, restoredot in _dotblas.c.

These are no longer needed. Also do C style cleanups.
ENH: Move dotblas_matrixproduct down into multiarray.

Move the dotblas_matrixproduct function from the _dotblas.c file to a
new cblasfuncs.c file in multiarray and rename it cblas_matrixproduct.
Modify it so that it can called directly from PyArray_MatrixProduct2 and
do so.  Fix up numeric.py and core/__init__.py to reflect these changes.
MAINT: Update waf to 1.7.16
ENH: Move dotblas_innerproduct down into multiarray.

Move the dotblas_innerproduct function from the _dotblas.c file to a new
cblasfuncs.c file in multiarray and rename it cblas_innerproduct.
Modify it so that it can called directly from PyArray_InnerProduct and
do so.  Fix up numeric.py and the tests to reflect these changes.
MAINT: Refactor ndarray.dot method to call PyArray_MatrixProduct2.

Now that PyArray_MatrixProduct2 is blas enabled, call it directly.
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.
DOC: Update docs to reflect deprecation of alterdot and restoredot.

Also move docstrings into the versions in numpy/core/numeric.py as
the functions are no longer in the defunct _dotblas module.
TST: Add vdot tests, move tests from test_blasdot to test_multiarray.

Not all tests from test_blasdot were relevant, as they checked the cblas
implementations against the non-cblas implementations. Those two are no
longer separate.

Remove test_blasdot.py as there nothing is left in it.
BUG: Capitalize environmental variables in numpy/core/__init__.py.
BLD: check for CBLAS header in "unoptimized" blas

Allows building against system installed blas library that might be
optimized.
MAINT: cleanup unnecessary code
ENH: add better error message for misaligned matrices

based on gh-4985 by Lars Buitinck