'Check that integer overflows are avoided (issue #931).'

def check_aggregation_magnitude(self, pyfunc, is_prod=False):

    n_items = (2 if is_prod else 10)
    arr = (np.arange(n_items) + 40000).astype('int16')
    (npr, nbr) = run_comparative(pyfunc, arr)
    self.assertPreciseEqual(npr, nbr)
    arr = (np.arange(10) + (2 ** 60)).astype('int64')
    (npr, nbr) = run_comparative(pyfunc, arr)
    self.assertPreciseEqual(npr, nbr)
    arr = arr.astype('uint64')
    (npr, nbr) = run_comparative(pyfunc, arr)
    self.assertPreciseEqual(npr, nbr)
