Merge pull request #3378 from juliantaylor/sdist-mtrand-gen

BUG: include mtrand cython files in sdist
Merge pull request #3371 from juliantaylor/mmap-slice-improve

Mmap slice improve
ENH: Fix SyntaxError when matrix() is called with invalid string

The numpy.matrix constructor uses eval(str.translate(table)) to convert
input strings to numeric matrix contents. str.translate(table) will
return empty string if str consists only of invalid characters, causing
SyntaxError in eval(). This is confusing, as one would expect an
exception like TypeError when trying to construct a matrix from invalid
input.

This fix makes sure eval() is only called if str is not empty and
TypeError is raised otherwise.
Merge pull request #3358 from leonnnn/matrix-typeerror

ENH: Fix SyntaxError when matrix() is called with invalid string
BUG: The npv function in financial.py was incorrectly implemented.

Correct the implementation of the npv function, its documentation, and
the mirr function that depends on it. The test_financial.py is also
corrected to take into account those modifications

The npv function behavior was contrary to what the documentation stated
as it summed indexes 1 to M instead of 0 to M-1. The mirr function used
a corrective factor to get the correct result in spite of that error so
that factor is removed.

Closes #649
BUG: Handle a version string from a custom-built mingw64.

The custom build compiler "GNU Fortran (rubenvb-4.8.0) 4.8.0" was
incorrectly parsed as version '-4.8.0' and the flag "-mno-cygwin" was
added to the compilation.

See http://cens.ioc.ee/pipermail/f2py-users/2010-October/002092.html.
MAINT: move byteswap macros to inlines in header

removes some duplication and allows older gcc that can't detect the
byteswap pattern to use the faster swapping instructions.
BUG: check alignment before loading the data

some cpus don't support loads that are not aligned to the elementsize.
regression introduced in 99cb95f7379a9.
MAINT: use npy_is_aligned in a few more places