code: def test_whiten_not_finite(self):
      for tp in np.array, matrix:
          for bad_value in np.nan, np.inf, -np.inf:
              obs = tp(
                  [
                      [0.98744510, bad_value],
                      [0.62093317, 0.19406729],
                      [0.87545741, 0.00735733],
                      [0.85124403, 0.26499712],
                      [0.45067590, 0.45464607],
                  ]
              )
              assert_raises(ValueError, whiten, obs)
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import sys
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_allclose, assert_equal, assert_
  from scipy._lib._numpy_compat import suppress_warnings
  import pytest
  from pytest import raises
  from scipy.cluster.vq import kmeans, kmeans2, py_vq, vq, whiten, ClusterError, _krandinit
  from scipy.cluster import _vq
  from scipy.sparse.sputils import matrix
label_desc: Use image node_id 3 for calling the TestWhiten obj's underlying member method code with example usage: obj.test_whiten_not_finite() without return types