code: def test_use_numpy_strict_false(self):
      # here the value is perfect, and we're not strict about it,
      # so creation should work
      u = SharedVariable(
          name="u",
          type=Tensor(broadcastable=[False], dtype="float64"),
          value=np.asarray([1.0, 2.0]),
          strict=False,
      )
  
      # check that assignments to value are cast properly
      u.set_value([3, 4])
      assert type(u.get_value()) is np.ndarray
      assert str(u.get_value(borrow=True).dtype) == "float64"
      assert np.all(u.get_value() == [3, 4])
  
      # check that assignments of nonsense fail
      try:
          u.set_value("adsf")
          assert 0
      except ValueError:
          pass
  
      # check that an assignment of a perfect value results in no copying
      uval = theano._asarray([5, 6, 7, 8], dtype="float64")
      u.set_value(uval, borrow=True)
      assert u.get_value(borrow=True) is uval
  
file_path: Theano/theano/compile/tests/test_shared.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import unittest
  import theano
  from theano.tensor import Tensor, TensorType
  from theano.compile.sharedvalue import shared
  from theano.compile.sharedvalue import SharedVariable
  from theano.compile.sharedvalue import generic
label_desc: Use image node_id 4 for calling the Test_SharedVariable obj's underlying member method code with example usage: obj.test_use_numpy_strict_false() without return types