code: def test_elemwise_erfinv(self):
      for dtype in self.dtypes:
          vector = theano.tensor.vector(dtype=dtype)
          output = theano.tensor.erfinv(vector)
          f_host = theano.function(
              [vector],
              output,
              name="HOST/erfinv/" + dtype,
              mode=self.mode_without_gpu,
          )
          f_gpu = theano.function(
              [vector],
              output,
              name="GPU/erfinv/" + dtype,
              mode=self.mode_with_gpu,
          )
          assert (
              len(
                  [
                      n
                      for n in f_host.maker.fgraph.apply_nodes
                      if isinstance(n.op, GpuElemwise)
                  ]
              )
              == 0
          )
          if not theano.config.device.startswith("opencl"):
              assert self.check_gpu_scalar_op(
                  f_gpu, GpuErfinv
              ), 'Function graph does not contains scalar op "GpuErfinv".'
          vector_val = self.default_arrays[dtype]
          f_host(vector_val)
          f_gpu(vector_val)
          out_host = f_host(vector_val)
          out_gpu = f_gpu(vector_val)
          assert_allclose(out_host, out_gpu)
          assert_allclose(self.expected_erfinv_outputs[dtype], out_gpu)
  
imports: from __future__ import absolute_import, print_function, division
  from copy import copy
  from unittest import TestCase
  import numpy
  import theano
  from theano import scalar, gof, tensor
  from theano.compile import DebugMode, Mode
  from theano.tests.unittest_tools import SkipTest, assert_allclose
  from theano.tensor.tests import test_elemwise
  from .config import mode_with_gpu, mode_without_gpu, test_ctx_name
  from .test_basic_ops import rand_gpuarray
  from ..elemwise import GpuElemwise, GpuDimShuffle, GpuCAReduceCuda, GpuCAReduceCPY, GpuErfinv, GpuErfcinv
  from ..dnn import GpuDnnReduction
  from ..type import GpuArrayType, get_context, gpuarray_shared_constructor
  from pygpu import ndgpuarray
label_desc: Use image node_id 3 for calling the TestMathErrorFunctions obj's underlying member method code with example usage: obj.test_elemwise_erfinv() without return types