code: def test_0(self):
      for op_fn in [
          _convert_to_int32,
          _convert_to_float32,
          _convert_to_float64,
      ]:
          for type_fn in bvector, ivector, fvector, dvector:
              x = type_fn()
              f = function([x], op_fn(x))
  
              xval = theano._asarray(
                  np.random.rand(10) * 10, dtype=type_fn.dtype
              )
              yval = f(xval)
              assert (
                  str(yval.dtype)
                  == op_fn.scalar_op.output_types_preference.spec[
                      0
                  ].dtype
              )
  
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 1 for calling the test_casting obj's underlying member method code with example usage: obj.test_0() without return types