docstr: Vectorized triangular area argmax computation.
  
  Parameters
  ----------
  prev_x : float
      The previous selected point is x value.
  prev_y : float
      The previous selected point its y value.
  avg_next_x : float
      The x mean of the next bucket
  avg_next_y : float
      The y mean of the next bucket
  x_bucket : np.ndarray
      All x values in the bucket
  y_bucket : np.ndarray
      All y values in the bucket
  
  Returns
  -------
  int
      The index of the point with the largest triangular area.
docstr_tok: ["Vectorized","triangular","area","argmax","computation",".","Parameters","--","--","--","--","--","prev_x",":","float","The","previous","selected","point","is","x","value",".","prev_y",":","float","The","previous","selected","point","its","y","value",".","avg_next_x",":","float","The","x","mean","of","the","next","bucket","avg_next_y",":","float","The","y","mean","of","the","next","bucket","x_bucket",":","np.ndarray","All","x","values","in","the","bucket","y_bucket",":","np.ndarray","All","y","values","in","the","bucket","Returns","--","--","--","-","int","The","index","of","the","point","with","the","largest","triangular","area","."]
code: def _argmax_area(
      prev_x, prev_y, avg_next_x, avg_next_y, x_bucket, y_bucket
  ) -> int:
      """Vectorized triangular area argmax computation.
  
      Parameters
      ----------
      prev_x : float
          The previous selected point is x value.
      prev_y : float
          The previous selected point its y value.
      avg_next_x : float
          The x mean of the next bucket
      avg_next_y : float
          The y mean of the next bucket
      x_bucket : np.ndarray
          All x values in the bucket
      y_bucket : np.ndarray
          All y values in the bucket
  
      Returns
      -------
      int
          The index of the point with the largest triangular area.
      """
      return np.abs(
          x_bucket * (prev_y - avg_next_y)
          + y_bucket * (avg_next_x - prev_x)
          + (prev_x * avg_next_y - avg_next_x * prev_y)
      ).argmax()
  
imports: import numpy
  from plotly_resampler.aggregation.aggregation_interface import DataPointSelector
  from typing import Union
label_desc: Use image node_id 1 for calling the LogLTTB obj's underlying member method code with example usage: obj._argmax_area(prev_x, prev_y, avg_next_x, avg_next_y, x_bucket, y_bucket) and returns: np