class_docstr: This structure stores a list of boxes as a Nx4 torch.Tensor.
  It supports some common methods about boxes
  (`area`, `clip`, `nonempty`, etc),
  and also behaves like a Tensor
  (support indexing, `to(device)`, `.device`, and iteration over all boxes)
  
  Attributes:
      tensor (torch.Tensor): float matrix of Nx4. Each row is (x1, y1, x2, y2).
class_docstr_tok: ["This","structure","stores","a","list","of","boxes","as","a","Nx4","torch.Tensor",".","It","supports","some","common","methods","about","boxes","(","`","area","`",",","`","clip","`",",","`","nonempty","`",",","etc",")",",","and","also","behaves","like","a","Tensor","(","support","indexing",",","`","to","(","device",")","`",",","`",".device","`",",","and","iteration","over","all","boxes",")","Attributes",":","tensor","(","torch.Tensor",")",":","float","matrix","of","Nx4",".","Each","row","is","(","x1",",","y1",",","x2",",","y2",")","."]
docstr: Find boxes that are non-empty.
  A box is considered empty, if either of its side is no larger than threshold.
  
  Returns:
      Tensor:
          a binary vector which represents whether each box is empty
          (False) or non-empty (True).
docstr_tok: ["Find","boxes","that","are","non-empty",".","A","box","is","considered","empty",",","if","either","of","its","side","is","no","larger","than","threshold",".","Returns",":","Tensor",":","a","binary","vector","which","represents","whether","each","box","is","empty","(","False",")","or","non-empty","(","True",")","."]
code: def nonempty(self, threshold: float = 0.0) -> torch.Tensor:
      """
      Find boxes that are non-empty.
      A box is considered empty, if either of its side is no larger than threshold.
  
      Returns:
          Tensor:
              a binary vector which represents whether each box is empty
              (False) or non-empty (True).
      """
      box = self.tensor
      widths = box[:, 2] - box[:, 0]
      heights = box[:, 3] - box[:, 1]
      keep = (widths > threshold) & (heights > threshold)
      return keep
  
imports: import math
  import numpy
  from enum import IntEnum, unique
  from typing import List, Tuple, Union
  import torch
  from torch import device
label_desc: Use image node_id 6 for calling the Boxes obj's underlying member method code with example usage: obj.nonempty(threshold) and returns: keep