class_docstr: This masks out image regions with blurring or inpainting.
      
class_docstr_tok: ["This","masks","out","image","regions","with","blurring","or","inpainting","."]
docstr: This partitions an image into a herarchical clustering based on axis-aligned splits.
          
docstr_tok: ["This","partitions","an","image","into","a","herarchical","clustering","based","on","axis-aligned","splits","."]
code: def build_partition_tree(self):
      """This partitions an image into a herarchical clustering based on axis-aligned splits."""
  
      xmin = 0
      xmax = self.input_shape[0]
      ymin = 0
      ymax = self.input_shape[1]
      zmin = 0
      zmax = self.input_shape[2]
      # total_xwidth = xmax - xmin
      total_ywidth = ymax - ymin
      total_zwidth = zmax - zmin
      q = numba.typed.List(
          [(0, xmin, xmax, ymin, ymax, zmin, zmax, -1, False)]
      )
      M = int((xmax - xmin) * (ymax - ymin) * (zmax - zmin))
      clustering = np.zeros((M - 1, 4))
      _jit_build_partition_tree(
          xmin,
          xmax,
          ymin,
          ymax,
          zmin,
          zmax,
          total_ywidth,
          total_zwidth,
          M,
          clustering,
          q,
      )
      self.clustering = clustering
  
file_path: shap/shap/maskers/_image.py
imports: import heapq
  import warnings
  import numba.typed
  import numpy
  from numba import njit
  from numba.core.errors import NumbaPendingDeprecationWarning
  from .._serializable import Deserializer, Serializer
  from ..utils import assert_import, record_import_error, safe_isinstance
  from ..utils._exceptions import DimensionError
  from ._masker import Masker
label_desc: Use image node_id 4 for calling the Image obj's underlying member method code with example usage: obj.build_partition_tree() without return types