code: def test_basic(self):
      for type1 in [
          "uint8",
          "uint16",
          "uint32",
          "uint64",
          "int8",
          "int16",
          "int32",
          "int64",
          "float32",
          "float64",
      ]:
          x = TensorType(dtype=type1, broadcastable=(False,))()
          for type2, converter in zip(
              ["int8", "int16", "int32", "int64", "float32", "float64"],
              [
                  _convert_to_int8,
                  _convert_to_int16,
                  _convert_to_int32,
                  _convert_to_int64,
                  _convert_to_float32,
                  _convert_to_float64,
              ],
          ):
              y = converter(x)
              f = function([compile.In(x, strict=True)], y)
              a = np.arange(10, dtype=type1)
              b = f(a)
              self.assertTrue(np.all(b == np.arange(10, dtype=type2)))
  
file_path: Theano/theano/tensor/tests/test_casting.py
imports: from __future__ import absolute_import, print_function, division
  import unittest
  from theano import function
  from theano.tensor.basic import _convert_to_int32, _convert_to_int8, _convert_to_int16, _convert_to_int64, _convert_to_float32, _convert_to_float64
  from theano.tensor import *
label_desc: Use image node_id 3 for calling the test_casting obj's underlying member method code with example usage: obj.test_basic() without return types