Modify doctest using NumPy to make it more cross-platform