linspace to random.rand