import math


def bilinear_interp(array, point):
    """Interpolate between the values at the integer-positions around the given float-position in the given array."""
    x = point[0]
    y = point[1]

    x_lower = math.floor(x)
    x_upper = x_lower + 1
    y_lower = math.floor(y)
    y_upper = y_lower + 1

    return (array[x_lower, y_lower] * (x_upper - x) * (y_upper - y) +
            array[x_lower, y_upper] * (x_upper - x) * (y - y_lower) +
            array[x_upper, y_lower] * (x - x_lower) * (y_upper - y) +
            array[x_upper, y_upper] * (x - x_lower) * (y - y_lower)
            )