ENH: Avoid the systematic casting to np.float64 in dilation function