class_docstr: End to end tests for pysparnn
class_docstr_tok: ["End","to","end","tests","for","pysparnn"]
docstr: Do a quick basic test for index/search functionality
docstr_tok: ["Do","a","quick","basic","test","for","index\/search","functionality"]
code: def test_dense_array(self):
      """Do a quick basic test for index/search functionality"""
      data = [
          "hello world",
          "oh hello there",
          "Play it",
          "Play it again Sam",
      ]
  
      features = [dict([(x, 1) for x in f.split()]) for f in data]
      features = DictVectorizer().fit_transform(features)
      features = features.toarray()
      cluster_index = ci.ClusterIndex(features, data)
  
      ret = cluster_index.search(
          features, k=1, k_clusters=1, return_distance=False
      )
      self.assertEqual([[d] for d in data], ret)
  
file_path: pysparnn/tests/test_pysparnn.py
imports: import unittest
  import pysparnn.cluster_index
  import numpy
  from scipy.sparse import csr_matrix
  from pysparnn.matrix_distance import SlowEuclideanDistance
  from pysparnn.matrix_distance import UnitCosineDistance
  from pysparnn.matrix_distance import DenseCosineDistance
  from sklearn.feature_extraction import DictVectorizer
label_desc: Use image node_id 4 for calling the PysparnnTest obj's underlying member method code with example usage: obj.test_dense_array() without return types