class_docstr: Test DataTransforms for images
class_docstr_tok: ["Test","DataTransforms","for","images"]
code: def test_center_crop(self):
      # Check center crop
      dt = DataTransforms(self.d)
      x_crop = 50
      y_crop = 50
      crop = dt.center_crop(x_crop, y_crop)
      y = self.d.shape[0]
      x = self.d.shape[1]
      x_start = x // 2 - (x_crop // 2)
      y_start = y // 2 - (y_crop // 2)
      check_crop = self.d[
          y_start : y_start + y_crop, x_start : x_start + x_crop
      ]
      assert np.allclose(check_crop, crop)
  
imports: import os
  import unittest
  import numpy
  import pytest
  import scipy.ndimage
  import deepchem
  from deepchem.trans.transformers import DataTransforms
label_desc: Use image node_id 3 for calling the TestDataTransforms obj's underlying member method code with example usage: obj.test_center_crop() without return types