[Numpy-discussion] PR to add a function to calculate histogram edges without calculating the histogram

2018-03-09 Thread Kirit Thadaka
Hi! I've created a PR to add a function called "histogram_bin_edges" which will allow a user to calculate the bins used by the histogram for some data without requiring the entire histogram to be calculated. https://github.com/numpy/numpy/pull/10591#issuecomment-371863472 This function allows

Re: [Numpy-discussion] Numpy-discussion

2019-01-29 Thread Kirit Thadaka
You are seeing negative numbers because of an overflow beyond 32 bits. Change the type of your np array to int64 using a = (np.arange(2000) ** 3).astype(np.int64) and you won’t see negative numbers. I assume you are running this code on a 32 bit machine which is why Numpy is defaulting to