def _make_strictly_increasing_boundaries_rows(
    boundary_matrix: np.ndarray) -> np.ndarray:
  """Converts a 2-d array of increasing rows to strictly increasing rows.

  Args:
    boundary_matrix: A 2-d np.array where each row is increasing.

  Returns:
    A 2-d np.array of the same size as `boundary_matrix` where each row is
    strictly increasing.
  """
  epsilon = (1e-6 *
             np.expand_dims(boundary_matrix[:, -1] - boundary_matrix[:, 0], 1))

  # Make sure every value in epsilon is positive.
  epsilon[epsilon <= 0] = 1e-6

  deltas = np.diff(boundary_matrix, axis=1)
  corrected_deltas = np.maximum(deltas, epsilon)

  # Reconstruct the matrix with corrected deltas without the 1st column.
  corrected_boundaries = (
      np.cumsum(corrected_deltas, axis=1) +
      np.expand_dims(boundary_matrix[:, 0], 1))

  # Reinsert the 1st column.
  return np.insert(corrected_boundaries, 0, boundary_matrix[:, 0], axis=1)
Converts a 2-d array of increasing rows to strictly increasing rows.

  Args:
    boundary_matrix: A 2-d np.array where each row is increasing.

  Returns:
    A 2-d np.array of the same size as `boundary_matrix` where each row is
    strictly increasing.
  
tensorflow_transform/beam/analyzer_impls.py