class_docstr: Calculate the average precision and average precision at n.
docstr: Peek the non-interpolated average precision at n.
  
  Returns:
    The non-interpolated average precision at n (default 0).
    If n is larger than the length of the ranked list,
    the average precision will be returned.
docstr_tok: ["Peek","the","non-interpolated","average","precision","at","n.","Returns",":","The","non-interpolated","average","precision","at","n","(","default","0",")",".","If","n","is","larger","than","the","length","of","the","ranked","list",",","the","average","precision","will","be","returned","."]
code: def peek_ap_at_n(self):
      """Peek the non-interpolated average precision at n.
  
      Returns:
        The non-interpolated average precision at n (default 0).
        If n is larger than the length of the ranked list,
        the average precision will be returned.
      """
      if self.heap_size <= 0:
          return 0
      predlists = numpy.array(list(zip(*self._heap)))
  
      ap = self.ap_at_n(
          predlists[0],
          predlists[1],
          n=self._top_n,
          total_num_positives=self._total_positives,
      )
      return ap
  
file_path: PaddleHub/modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/average_precision_calculator.py
imports: import heapq
  import random
  import numbers
  import numpy
label_desc: Use image node_id 6 for calling the AveragePrecisionCalculator obj's underlying member method code with example usage: obj.peek_ap_at_n() and returns: ap, int