class_docstr: Test RdkitGridFeaturizer class defined in rdkit_grid_featurizer module.
code: def test_failures(self):
      # test flattened voxel features
      featurizer = RdkitGridFeaturizer(
          nb_rotations=0,
          box_width=75.0,
          voxel_width=1.0,
          feature_types=["voxel_combined"],
          flatten=True,
          sanitize=True,
      )
  
      features = featurizer.featurize(
          [(self.ligand_file, self.protein_file), ("nan", "nan")]
      )
      self.assertEqual(features.shape, (2, 16875000))
  
      # test voxel features
      featurizer = RdkitGridFeaturizer(
          nb_rotations=0,
          box_width=75.0,
          voxel_width=1.0,
          feature_types=["voxel_combined"],
          flatten=False,
          sanitize=True,
      )
      features = featurizer.featurize(
          [(self.ligand_file, self.protein_file), ("nan", "nan")]
      )
      self.assertEqual(features.shape, (2, 75, 75, 75, 40))
  
      # test flat features
      featurizer = RdkitGridFeaturizer(
          nb_rotations=0,
          box_width=75.0,
          voxel_width=1.0,
          feature_types=["flat_combined"],
          flatten=True,
          sanitize=True,
      )
      features = featurizer.featurize(
          [(self.ligand_file, self.protein_file), ("nan", "nan")]
      )
      self.assertEqual(features.shape, (2, 51))
  
      # test rotations
      featurizer = RdkitGridFeaturizer(
          nb_rotations=5,
          box_width=75.0,
          voxel_width=1.0,
          feature_types=["flat_combined"],
          flatten=True,
          sanitize=True,
      )
      features = featurizer.featurize(
          [(self.ligand_file, self.protein_file), ("nan", "nan")]
      )
      self.assertEqual(features.shape, (2, 306))
  
file_path: deepchem/deepchem/feat/tests/test_rdkit_grid_features.py
imports: import os
  import unittest
  import numpy
  from deepchem.feat import RdkitGridFeaturizer
label_desc: Use image node_id 8 for calling the TestRdkitGridFeaturizer obj's underlying member method code with example usage: obj.test_failures() without return types