code: def setUpClass(cls):
      if not imported_scipy_special:
          raise SkipTest("scipy.special needed")
      # NB: erfinv is defined in ]-1;1[, and erfcinv is defined in ]0;2[,
      # so we just take some values in an interval that covers both domains
      # (this will also allow to test some values outside the domains).
      # We take [-5;5[ by default and we concatenate it 1000 times
      # to have the GPU ops run on large data.
      default_array = [x / 10.0 for x in range(-50, 50)] * 1000
      for dtype in cls.dtypes:
          numpy_array = np.asarray(default_array, dtype=dtype)
          cls.default_arrays[dtype] = numpy_array
          cls.expected_erfinv_outputs[dtype] = scipy.special.erfinv(
              numpy_array
          )
          cls.expected_erfcinv_outputs[dtype] = scipy.special.erfcinv(
              numpy_array
          )
  
      # Since there are infinite values, we need to disable that check
      # in DebugMode if needed
      if isinstance(mode_with_gpu, DebugMode):
          cls.mode_with_gpu = copy(mode_with_gpu)
          cls.mode_with_gpu.check_isfinite = False
      else:
          cls.mode_with_gpu = mode_with_gpu
      if isinstance(mode_without_gpu, DebugMode):
          cls.mode_without_gpu = copy(mode_without_gpu)
          cls.mode_without_gpu.check_isfinite = False
      else:
          cls.mode_without_gpu = mode_without_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 1 for calling the TestMathErrorFunctions obj's underlying member method code with example usage: obj.setUpClass(cls) without return types