class_docstr: Test that the wrapped NumPy functionality integrates well
  with standard NumPy functions.
class_docstr_tok: ["Test","that","the","wrapped","NumPy","functionality","integrates","well","with","standard","NumPy","functions","."]
docstr: Test that you can create the tensor class from NumPy functions
  instantiated via shapes with the requires_grad argument
docstr_tok: ["Test","that","you","can","create","the","tensor","class","from","NumPy","functions","instantiated","via","shapes","with","the","requires_grad","argument"]
code: def test_tensor_creation_from_shape(self, fn, kwargs):
      """Test that you can create the tensor class from NumPy functions
      instantiated via shapes with the requires_grad argument"""
      # default value is true
      shape = 4
      x = fn(shape, **kwargs)
  
      assert isinstance(x, np.tensor)
      assert x.requires_grad
  
      x = fn(shape, requires_grad=True, **kwargs)
      assert x.requires_grad
  
      x.requires_grad = False
      assert not x.requires_grad
  
      x = fn(shape, requires_grad=False, **kwargs)
      assert not x.requires_grad
  
imports: import numpy
  import pytest
  from autograd.numpy.numpy_boxes import ArrayBox
  import pennylane
  from pennylane import numpy
  from pennylane.numpy.tensor import tensor_to_arraybox
label_desc: Use image node_id 2 for calling the TestNumpyIntegration obj's underlying member method code with example usage: obj.test_tensor_creation_from_shape(fn, kwargs) without return types