Hot answers tagged


I just took the code from your second link and did: import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import interp1d def centeredDistanceMatrix(n): # make sure n is odd x,y = np.meshgrid(range(n),range(n)) return np.sqrt((x-(n/2)+1)**2+(y-(n/2)+1)**2) def function(d): return np.log(d) # or any funciton you might ...

Only top voted, non community-wiki answers of a minimum length are eligible