code: def test_vq_1d(self):
      # Test special rank 1 vq algo, python implementation.
      data = X[:, 0]
      initc = data[:3]
      a, b = _vq.vq(data, initc)
      ta, tb = py_vq(data[:, np.newaxis], initc[:, np.newaxis])
      assert_array_equal(a, ta)
      assert_array_equal(b, tb)
  
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 TestVq obj's underlying member method code with example usage: obj.test_vq_1d() without return types