MAINT: Remove use of compiler module.

The ast module was added in Python 2.6 as a replacement for the compiler
module. As we no longer support Python versions < 2.6, all uses of the
compiler module can be removed.
BUG: Fix writing of intrinsic long integers in python2 npy files.

This only happens when C long is smaller than npy_intp, in particular,
on 64 bit windows. The 'L' suffix is not needed as long as safe_eval
is used to recover the values, and the long intrinsic causes problems
for python3.

The python3 read side has been fixed, but we might as well fix the
problem at the root as well.
BUG: fix nanmedian on arrays containing inf

There are two issues:
A masked divide of an infinite value is a masked value which means one
can't use np.ma.mean to compute the median as infinity division is well
defined.
This behaviour seems wrong to me but it also looks intentional so
changing it is not appropriate for a bugfix release.

The second issue is that the ordering of the sorted masked array is
undefined for equal values, the sorting considers infinity the largest
floating point value which is not correct in respect to sorting where
nan is considered larger. This is fixed by changing the
minimum_fill_value to nan for float data in the masked sorts.

Closes gh-5138
Add examples for intersect1d and union1d of more than two arrays.

The approach was suggested by Jaime Frio in issue #5179.
Merge pull request #5189 from cbrueffer/setops

Add examples for intersect1d and union1d of more than two arrays.
Merge pull request #5183 from charris/fix-npy-header-write

BUG: Fix writing of intrinsic long integers in python2 npy files.
BLD: try linking a file if compile long double repr detection fails

When compiler uses link time optimization it will not emit the binary
representation of the long double during linking. This prevents building
numpy with -flto.
To avoid this try linking the object when the compile detection failed.
With this change numpy can be built with link time optimization with 4 worker
processes using following command:

CC='gcc -fno-fat-lto-objects -flto=4 -fuse-linker-plugin -O3' \
LDSHARED='gcc -fno-fat-lto-objects -flto=4 -fuse-linker-plugin -shared
-O3' AR=gcc-ar \
python setup.py build_ext

See also:
https://www.mail-archive.com/numpy-discussion@scipy.org/msg45535.html

Should also work with icc's -ipo switch (probably closes gh-4992)
BLD: change expected type sizes to 64 bit

64 bit is more common these days, so switch the expected type sizes to
values common on this platform. This removes a few compile tests. The
expected sizes are just hints and do not have to be correct.
BLD: fix expected size argument for complex types

The caller was passing a list of lists instead of a list with its
entries doubled. Removes the binary type search for most if not all
platforms.
MAINT: remove obsolete version checks

minimum requirement is python2.6, this allows removing a couple 2.3 and
2.4 checks.
Merge pull request #5191 from juliantaylor/config-maint

size and version check maintenance
Merge pull request #5177 from charris/do-not-use-compiler-module

MAINT: Remove use of compiler module.
MAINT: Use ast.literal_eval in safe_eval.

This does what is needed now that the compiler module is no longer
used.
DEP: Deprecate SafeEval class.

The class is no longer used in numpy and was never exported.
Merge pull request #5192 from charris/deprecate-safeeval-class

Deprecate SafeEval class
BUG: Fixes #5184 gradient calculation behavior at boundaries

* Previous expected behavior was that the gradient is computed using central
  differences in the interior and first differences at the boundaries.

* gradient was updated in v1.9.0 so that second-order accurate calculations are
  done at the boundaries, but this breaks expected behavior with old code, so
  `edge_order` keyword (Default: 1) is added to specify whether first or second
  order calculations at the boundaries should be used.

* Since the second argument is *varargs, in order to maintain compatibility
  with old code and compatibility with python 2.6 & 2.7, **kwargs is used, and
  all kwargs that are not `edge_order` raise an error, listing the offending
  kwargs.

* Tests and documentation updated to reflect this change.

* Added `.. versionadded:: 1.9.1` to the new optional kwarg `edge_order`
  documentation, and specified supported `edge_order` kwarg values.

* Clarified documentation for `varargs`.

* Made indentation in docstring consistent with other docstring styles.

* Examples corrected
Merge pull request #5186 from pseudocubic/gradient-boundary-order-keyword

BUG: Fixes #5184 gradient calculation behavior at boundaries
Merge pull request #5182 from juliantaylor/nanmedian-inf

BUG: fix nanmedian on arrays containing inf
Merge pull request #5190 from juliantaylor/lto-support

BLD: try linking a file if compile long double repr detection fails