|
From: surfcast23 <sur...@gm...> - 2012-08-03 03:50:09
|
sorry misssed this line "Which produces x and y with the same shapes, and their values duplicated in the direction the array was "expanded"." surfcast23 wrote: > > Wouldn't > > X= np.ones((1, 45)) > Y= np.zeros((32, 1)) > > change the existing values of the elements to ones and zeros? > > > Benjamin Root-2 wrote: >> >> On Thursday, August 2, 2012, surfcast23 wrote: >> >>> >>> Okay thank you! The Matlab code I am basing this on takes arrays of >>> different >>> shapes with different sized elements ie >>> x = 1 512 >>> y = 101 1 >>> and I guess automatically makes the the same shape. Can you point me in >>> the >>> direction of documentation that will explain how I can do this in >>> Python? >>> >>> >> Ok, I just double-checked the source for plot_wireframe(). It does not >> perform any broadcasting (which I consider to be a bug). >> >> Until it is fixed, you will have to do the broadcasting yourself: >> >> X= np.ones((1, 45)) >> Y= np.zeros((32, 1)) >> x, y = np.broadcast_arrays(X, Y) >> >> Which produces x and y with the same shapes, and their values duplicated >> in >> the direction the array was "expanded". >> >> Pass those into plot_wireframe(). >> >> Ben Root >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > -- View this message in context: http://old.nabble.com/Size-of-array-elements-when-using-Axes3D.plot_wireframe%28X%2C-Y%2C-Z%2C-*args%2C-**kwargs%29-tp34243823p34249160.html Sent from the matplotlib - users mailing list archive at Nabble.com. |