class_docstr: CooksDistance visual test cases
class_docstr_tok: ["CooksDistance","visual","test","cases"]
docstr: Test on concrete dataset with numpy arrays
docstr_tok: ["Test","on","concrete","dataset","with","numpy","arrays"]
code: def test_numpy_integration(self):
      """
      Test on concrete dataset with numpy arrays
      """
      data = load_concrete(return_dataset=True)
      X, y = data.to_numpy()
  
      assert isinstance(X, np.ndarray)
      assert isinstance(y, np.ndarray)
  
      _, ax = plt.subplots()
      viz = CooksDistance(ax=ax).fit(X, y)
      assert_fitted(viz)
  
      assert viz.distance_.sum() == pytest.approx(1.2911900571300652)
      assert viz.p_values_.sum() == pytest.approx(1029.9999525376425)
      assert viz.influence_threshold_ == pytest.approx(
          0.003883495145631068
      )
      assert viz.outlier_percentage_ == pytest.approx(
          7.3786407766990285
      )
  
      viz.finalize()
      self.assert_images_similar(viz)
  
file_path: yellowbrick/tests/test_regressor/test_influence.py
imports: import pytest
  import numpy
  import matplotlib.pyplot
  from tests.base import VisualTestCase
  from tests.fixtures import Dataset
  from sklearn.datasets import make_regression
  from yellowbrick.regressor.influence import *
  from yellowbrick.datasets import load_concrete
label_desc: Use image node_id 4 for calling the TestCooksDistance obj's underlying member method code with example usage: obj.test_numpy_integration() without return types