I want to find that x,y co-ordinates of all the local maxima of a 3D surface B-Spline made using bisplrep.
splder, and sproot are used with splrep to find for single variate B-Spline. How is bisplrep maxima and minima found?
My code is given below.
tck = interpolate.bisplrep(X, Y, sensor_counts, s=0)
xnew, ynew = np.mgrid[ min(grid_x):max(grid_x):100j, min(grid_y):max(grid_y):100j]
znew = interpolate.bisplev(xnew[:,0], ynew[0,:], tck, dx=0, dy=1)
print xnew
print ynew
fig = plt.figure()
ax = fig.gca(projection='3d')
print tck
surf = ax.plot_surface(xnew, ynew, znew, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=0, antialiased=False)
cset = ax.contour(xnew, ynew, znew, zdir='z', offset=5100, cmap=cm.coolwarm)