def _random_array(n): "Return a random array of length n with elements in [-1,1)." return 2 * random_array() - 1