code: def test_unpickle_gpuarray_as_numpy_ndarray_flag0():
      # Test when pygpu isn't there for unpickle are in test_pickle.py
      oldflag = config.experimental.unpickle_gpu_on_cpu
      config.experimental.unpickle_gpu_on_cpu = False
  
      try:
          testfile_dir = os.path.dirname(os.path.realpath(__file__))
          fname = "GpuArray.pkl"
  
          with open(os.path.join(testfile_dir, fname), "rb") as fp:
              if PY3:
                  u = CompatUnpickler(fp, encoding="latin1")
              else:
                  u = CompatUnpickler(fp)
              mat = u.load()
              assert isinstance(mat, pygpu.gpuarray.GpuArray)
              assert np.asarray(mat)[0] == -42.0
      finally:
          config.experimental.unpickle_gpu_on_cpu = oldflag
  
imports: from __future__ import absolute_import, print_function, division
  import os
  import nose
  import numpy
  import theano
  from theano.compat import PY3
  from theano import config
  from theano.compile import DeepCopyOp, Rebroadcast, ViewOp
  from theano.misc.pkl_utils import CompatUnpickler
  from .config import test_ctx_name
  from .test_basic_ops import rand_gpuarray
  from ..type import GpuArrayType, gpuarray_shared_constructor
  import pygpu
label_desc: Use image node_id 9 for calling a global function with example usage: test_unpickle_gpuarray_as_numpy_ndarray_flag0() without return types