class_docstr: Module level tests for all sktime distributions.
docstr: Test subsetting of distribution.
docstr_tok: ["Test","subsetting","of","distribution","."]
code: def test_subsetting(self, estimator_instance, subset_row, subset_col):
      """Test subsetting of distribution."""
      d = estimator_instance
  
      if subset_row:
          ix_loc = random_ss_ix(d.index, 3)
          ix_iloc = d.index.get_indexer(ix_loc)
      else:
          ix_loc = d.index
          ix_iloc = pd.RangeIndex(len(d.index))
  
      if subset_col:
          iy_loc = random_ss_ix(d.columns, 1)
          iy_iloc = d.columns.get_indexer(iy_loc)
      else:
          iy_loc = d.columns
          iy_iloc = pd.RangeIndex(len(d.columns))
  
      res_loc = d.loc[ix_loc, iy_loc]
  
      assert isinstance(res_loc, type(d))
      assert res_loc.shape == (len(ix_loc), len(iy_loc))
      assert (res_loc.index == ix_loc).all()
      assert (res_loc.columns == iy_loc).all()
  
      res_iloc = d.iloc[ix_iloc, iy_iloc]
  
      assert isinstance(res_iloc, type(d))
      assert res_iloc.shape == (len(ix_iloc), len(iy_iloc))
      assert (res_iloc.index == ix_loc).all()
      assert (res_iloc.columns == iy_loc).all()
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import check_is_mtype
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils.index import random_ss_ix
label_desc: Use image node_id 6 for calling the TestAllDistributions obj's underlying member method code with example usage: obj.test_subsetting(estimator_instance, subset_row, subset_col) without return types