code: def test_from_arrays_with_ndarray(self):
      texts = np.array([f"train data {i}" for i in range(10)])
      labels = np.array([random_labeling(3) for _ in range(10)])
  
      dataset = TextDataset.from_arrays(texts, labels)
      self.assertTrue(isinstance(dataset.x, list))
      assert_array_equal(texts, dataset.x)
      assert_array_equal(labels, dataset.y)
  
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal
  from sklearn.feature_extraction.text import TfidfVectorizer
  from unittest.mock import patch
  from small_text.data import SklearnDataset, TextDataset
  from tests.utils.datasets import random_labeling, random_labels
  from tests.utils.testing import assert_csr_matrix_equal
label_desc: Use image node_id 2 for calling the TextDatasetConstructionSingleLabelTest obj's underlying member method code with example usage: obj.test_from_arrays_with_ndarray() without return types