Problem with hist

Hi, I need to know why the attached code works in one case and takes forever to run in the other one.
I don't think I've done anything wrong and I tried everything that came to my mind now.
If you use "x1 = mu + sigma * np.random.randn(1000)" instead of "x1 = np.array([np.float64(val / 2.0) for val in x0], np.float64)"
Why doesn't this work if its the same array divided by 2 ?

Thanks,

Axel Gembe

test.py (662 Bytes)

Axel Gembe wrote:

Hi, I need to know why the attached code works in one case and takes forever to run in the other one.
I don't think I've done anything wrong and I tried everything that came to my mind now.
If you use "x1 = mu + sigma * np.random.randn(1000)" instead of "x1 = np.array([np.float64(val / 2.0) for val in x0], np.float64)"
Why doesn't this work if its the same array divided by 2 ?

Thanks,

Axel Gembe

OK, actually I didn't construct x1 from x1 but from x0 in the code.
The problem only happens when both arrays have the same length, content does not matter.

Axel Gembe