[plotting util] faster generation of grid

This commit is contained in:
Max Zwiessele 2016-03-30 09:51:05 +01:00
parent c4020cd2eb
commit a35ed532a8

View file

@ -379,5 +379,5 @@ def x_frame2D(X,plot_limits=None,resolution=None):
resolution = resolution or 50
xx, yy = np.mgrid[xmin[0]:xmax[0]:1j*resolution,xmin[1]:xmax[1]:1j*resolution]
Xnew = np.vstack((xx.flatten(),yy.flatten())).T
Xnew = np.c_[xx.flat, yy.flat]
return Xnew, xx, yy, xmin, xmax