numpy 1.14 has changed its output format for str and repr, changing whitespace and the number of sig figs. This breaks doctests that include direct numpy output without formatting the values explicitly.

It is possible to configure numpy 1.14 to use legacy formatting which almost always fixes the doctest problem. Adding something like the following to each test file, to the pytest or to a test runner script is sufficient:

# Whitespace changes between numpy 1.13 and 1.14 will cause the doctests
# to fail; when doctests are updated to 1.14 format, this can be removed.
try:    # CRUFT
    import numpy as np
except TypeError:

Example packages: