Fix-up logic for checking for zero-d arrays.
TST: Add a test for ndindex call.
BUG: gh-2790, fix column scaling in polynomial package least squares.

The columns should be scaled using their 2-norm, but in the complex case
that was being incorrectly computed as the square root of the sum of the
squared elements rather than as the square root of the  sum of their squared
real and imaginary parts.
TST: Add Test for column scaling in the polynomial package fits.

The test uses the complex set of sample points [1, 1j, -1, -1j] whose
squared sum is exactly zero. This would fail before the column scaling
was fixed.
Merge pull request #2940 from ContinuumIO/ndindex_fix_more

BUG: Fix logic in ndindex to match __init__ method.   Fixes bug in ndindex((3,))
MAINT: Use a better method to detect complex arrays.

Instead of

    if lhs.dtype.char in np.typecodes['Complex']:

use

    if issubclass(lhs.dtype.type, np.complexfloating):
REF: make the separate compilation env handling a tad simpler.
FEAT: use separate build by default.
DOC: mention the change of default for separate compilation.
DOC/FIX: fix example in ctypeslib module documentation

Fix some inconsistencies in the example. The library is loaded as '_lib' not
'lib' in the rest of the example. Also, the function is called 'foo_func' not
'foo'
Merge pull request #2960 from esc/doc/fix/ctypeslib

DOC/FIX: fix example in ctypeslib module documentation
Merge pull request #2947 from charris/fix-complex-polynomial-fit

Fix complex polynomial fit