# Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points

This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be challenging
too.

See also http://en.wikipedia.org/wiki/Great-circle_distance
"""

import numpy as np


def make_env(n=100):
    rng = np.random.RandomState(42)
    a = rng.rand(n, 2)
    b = rng.rand(n, 2)
    return (a, b), {}

# Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points

This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be challenging
too.

See also http://en.wikipedia.org/wiki/Great-circle_distance
"""

import numpy as np


def make_env(n=1000):
    rng = np.random.RandomState(42)
    a = rng.rand(n, 2)
    b = rng.rand(n, 2)
    return (a, b), {}

Make arc distance test size bigger to better show the difference.
Make arc distance test size bigger to better show the difference.

Now on the web site, 5 on the 7 test case have speed of 0.001, the minimal value.
