def findSector(self, x, y):
    '\n        Finds the quadrilateral "sector" for each (x,y) point in the input.\n        Only called as a subroutine of _evaluate().\n\n        Parameters\n        ----------\n        x : np.array\n            Values whose sector should be found.\n        y : np.array\n            Values whose sector should be found.  Should be same size as x.\n\n        Returns\n        -------\n        x_pos : np.array\n            Sector x-coordinates for each point of the input, of the same size.\n        y_pos : np.array\n            Sector y-coordinates for each point of the input, of the same size.\n        '
    m = x.size
    x_pos_guess = ((np.ones(m) * self.x_n) / 2).astype(int)
    y_pos_guess = ((np.ones(m) * self.y_n) / 2).astype(int)
    violationCheck = (lambda x_check, y_check, x_bound_1, y_bound_1, x_bound_2, y_bound_2: (((((y_bound_2 - y_bound_1) * x_check) - ((x_bound_2 - x_bound_1) * y_check)) > ((x_bound_1 * y_bound_2) - (y_bound_1 * x_bound_2))) + 0))
    these = np.ones(m, dtype=bool)
    max_loops = (self.x_n + self.y_n)
    loops = 0
    while (np.any(these) and (loops < max_loops)):
        x_temp = x[these]
        y_temp = y[these]
        xA = self.x_values[(x_pos_guess[these], y_pos_guess[these])]
        xB = self.x_values[((x_pos_guess[these] + 1), y_pos_guess[these])]
        xC = self.x_values[(x_pos_guess[these], (y_pos_guess[these] + 1))]
        xD = self.x_values[((x_pos_guess[these] + 1), (y_pos_guess[these] + 1))]
        yA = self.y_values[(x_pos_guess[these], y_pos_guess[these])]
        yB = self.y_values[((x_pos_guess[these] + 1), y_pos_guess[these])]
        yC = self.y_values[(x_pos_guess[these], (y_pos_guess[these] + 1))]
        yD = self.y_values[((x_pos_guess[these] + 1), (y_pos_guess[these] + 1))]
        move_down = ((y_temp < np.minimum(yA, yB)) + 0)
        move_right = ((x_temp > np.maximum(xB, xD)) + 0)
        move_up = ((y_temp > np.maximum(yC, yD)) + 0)
        move_left = ((x_temp < np.minimum(xA, xC)) + 0)
        c = ((((move_down + move_right) + move_up) + move_left) == 0)
        move_down[c] = violationCheck(x_temp[c], y_temp[c], xA[c], yA[c], xB[c], yB[c])
        move_right[c] = violationCheck(x_temp[c], y_temp[c], xB[c], yB[c], xD[c], yD[c])
        move_up[c] = violationCheck(x_temp[c], y_temp[c], xD[c], yD[c], xC[c], yC[c])
        move_left[c] = violationCheck(x_temp[c], y_temp[c], xC[c], yC[c], xA[c], yA[c])
        x_pos_next = ((x_pos_guess[these] - move_left) + move_right)
        x_pos_next[(x_pos_next < 0)] = 0
        x_pos_next[(x_pos_next > (self.x_n - 2))] = (self.x_n - 2)
        y_pos_next = ((y_pos_guess[these] - move_down) + move_up)
        y_pos_next[(y_pos_next < 0)] = 0
        y_pos_next[(y_pos_next > (self.y_n - 2))] = (self.y_n - 2)
        no_move = np.array(np.logical_and((x_pos_guess[these] == x_pos_next), (y_pos_guess[these] == y_pos_next)))
        x_pos_guess[these] = x_pos_next
        y_pos_guess[these] = y_pos_next
        temp = these.nonzero()
        these[temp[0][no_move]] = False
        loops += 1
    x_pos = x_pos_guess
    y_pos = y_pos_guess
    return (x_pos, y_pos)
Finds the quadrilateral "sector" for each (x,y) point in the input.
Only called as a subroutine of _evaluate().

Parameters
----------
x : np.array
    Values whose sector should be found.
y : np.array
    Values whose sector should be found.  Should be same size as x.

Returns
-------
x_pos : np.array
    Sector x-coordinates for each point of the input, of the same size.
y_pos : np.array
    Sector y-coordinates for each point of the input, of the same size.
def findSector(self, x, y):
    '\n        Finds the quadrilateral "sector" for each (x,y) point in the input.\n        Only called as a subroutine of _evaluate().\n\n        Parameters\n        ----------\n        x : np.array\n            Values whose sector should be found.\n        y : np.array\n            Values whose sector should be found.  Should be same size as x.\n\n        Returns\n        -------\n        x_pos : np.array\n            Sector x-coordinates for each point of the input, of the same size.\n        y_pos : np.array\n            Sector y-coordinates for each point of the input, of the same size.\n        '
    m = x.size
    x_pos_guess = ((np.ones(m) * self.x_n) / 2).astype(int)
    y_pos_guess = ((np.ones(m) * self.y_n) / 2).astype(int)
    violationCheck = (lambda x_check, y_check, x_bound_1, y_bound_1, x_bound_2, y_bound_2: (((((y_bound_2 - y_bound_1) * x_check) - ((x_bound_2 - x_bound_1) * y_check)) > ((x_bound_1 * y_bound_2) - (y_bound_1 * x_bound_2))) + 0))
    these = np.ones(m, dtype=bool)
    max_loops = (self.x_n + self.y_n)
    loops = 0
    while (np.any(these) and (loops < max_loops)):
        x_temp = x[these]
        y_temp = y[these]
        xA = self.x_values[(x_pos_guess[these], y_pos_guess[these])]
        xB = self.x_values[((x_pos_guess[these] + 1), y_pos_guess[these])]
        xC = self.x_values[(x_pos_guess[these], (y_pos_guess[these] + 1))]
        xD = self.x_values[((x_pos_guess[these] + 1), (y_pos_guess[these] + 1))]
        yA = self.y_values[(x_pos_guess[these], y_pos_guess[these])]
        yB = self.y_values[((x_pos_guess[these] + 1), y_pos_guess[these])]
        yC = self.y_values[(x_pos_guess[these], (y_pos_guess[these] + 1))]
        yD = self.y_values[((x_pos_guess[these] + 1), (y_pos_guess[these] + 1))]
        move_down = ((y_temp < np.minimum(yA, yB)) + 0)
        move_right = ((x_temp > np.maximum(xB, xD)) + 0)
        move_up = ((y_temp > np.maximum(yC, yD)) + 0)
        move_left = ((x_temp < np.minimum(xA, xC)) + 0)
        c = ((((move_down + move_right) + move_up) + move_left) == 0)
        move_down[c] = violationCheck(x_temp[c], y_temp[c], xA[c], yA[c], xB[c], yB[c])
        move_right[c] = violationCheck(x_temp[c], y_temp[c], xB[c], yB[c], xD[c], yD[c])
        move_up[c] = violationCheck(x_temp[c], y_temp[c], xD[c], yD[c], xC[c], yC[c])
        move_left[c] = violationCheck(x_temp[c], y_temp[c], xC[c], yC[c], xA[c], yA[c])
        x_pos_next = ((x_pos_guess[these] - move_left) + move_right)
        x_pos_next[(x_pos_next < 0)] = 0
        x_pos_next[(x_pos_next > (self.x_n - 2))] = (self.x_n - 2)
        y_pos_next = ((y_pos_guess[these] - move_down) + move_up)
        y_pos_next[(y_pos_next < 0)] = 0
        y_pos_next[(y_pos_next > (self.y_n - 2))] = (self.y_n - 2)
        no_move = np.array(np.logical_and((x_pos_guess[these] == x_pos_next), (y_pos_guess[these] == y_pos_next)))
        x_pos_guess[these] = x_pos_next
        y_pos_guess[these] = y_pos_next
        temp = these.nonzero()
        these[temp[0][no_move]] = False
        loops += 1
    x_pos = x_pos_guess
    y_pos = y_pos_guess
    return (x_pos, y_pos)