def subpixel_indices(position, subsampling):
 fractions = np.modf((np.asanyarray(position) + 0.5))[0]
 return np.floor((fractions * subsampling))

def subpixel_indices ( position , subsampling ) : fractions = np . modf ( ( np . asanyarray ( position ) + 0.5 ) ) [ 0 ] return np . floor ( ( fractions * subsampling ) )
convert decimal points to indices .