class_docstr: Tests scalar data class.
      
class_docstr_tok: ["Tests","scalar","data","class","."]
code: def setUp(self):
      tf.test.TestCase.setUp(self)
  
      # Create test data
      # pylint: disable=no-member
      int_data = np.linspace(0, 100, num=101, dtype=np.int32).tolist()
      int_data = [str(i) for i in int_data]
      int_file = tempfile.NamedTemporaryFile()
      int_file.write("\n".join(int_data).encode("utf-8"))
      int_file.flush()
      self._int_file = int_file
  
      self._int_hparams = {
          "num_epochs": 1,
          "batch_size": 1,
          "shuffle": False,
          "dataset": {
              "files": self._int_file.name,
              "data_type": "int",
              "data_name": "label",
          },
      }
  
      self._float_hparams = {
          "num_epochs": 1,
          "batch_size": 1,
          "shuffle": False,
          "dataset": {
              "files": self._int_file.name,
              "data_type": "float",
              "data_name": "feat",
          },
      }
  
file_path: texar/tests/data/data/scalar_data_test.py
imports: import copy
  import tempfile
  import numpy
  import tensorflow
  import texar.tf
label_desc: Use image node_id 1 for calling the ScalarDataTest obj's underlying member method code with example usage: obj.setUp() without return types