code: def test_kmeans2_init(self):
      np.random.seed(12345)
      data = TESTDATA_2D
  
      kmeans2(data, 3, minit="points")
      kmeans2(data[:, :1], 3, minit="points")  # special case (1-D)
  
      kmeans2(data, 3, minit="++")
      kmeans2(data[:, :1], 3, minit="++")  # special case (1-D)
  
      # minit='random' can give warnings, filter those
      with suppress_warnings() as sup:
          sup.filter(message="One of the clusters is empty. Re-run")
          kmeans2(data, 3, minit="random")
          kmeans2(data[:, :1], 3, minit="random")
  
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 8 for calling the TestKMean obj's underlying member method code with example usage: obj.test_kmeans2_init() without return types