Me being used to numpy automatic broadcasting, wrote:
f.interpolate( lambda x : np.linalg.norm(x - a))
where a is a 3 elements array.
However that does not work, as x is a 3 \times N_\mathrm{points} array, and numpy does automatic broadcasting from the right.
I can easily fix it by calling x.transpose() inside the expression, however the code is less clean. (my actual expression is a little bit more cumbersome)
Is there a reason for choosing the d \times N_\mathrm{points} arrangement instead of the transposed one?
The reason for choosing this is that it allows for vectorized operations in Python, rather than looping over each point, which would be inefficient. (It also gives nice memory alignment).