statistics - How to create a histogram2d of two arrays of different lengths? -


i trying create numpy histogram2d x , y sizes of x , y different. documentation, x , y need have same size, data , application have naturally needs histogram have different x , y dimensions

bins = 100 x = np.random.normal(3, 1, 100) y = np.random.normal(1, 1, 150) np.histogram2d(x, y, bins)[0] 

gives me

valueerror: operands not broadcast shapes (100,) (150,)  


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -