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 unary operators (negate, power)
  correctly work on tensors.
docstr_tok: ["Test","that","unary","operators","(","negate",",","power",")","correctly","work","on","tensors","."]
code: def test_unary_operators(self):
      """Test that unary operators (negate, power)
      correctly work on tensors."""
      x = np.array([[1, 2], [3, 4]])
      res = -x
      assert isinstance(res, np.tensor)
      assert res.requires_grad
  
      x = np.array([[1, 2], [3, 4]], requires_grad=False)
      res = -x
      assert isinstance(res, np.tensor)
      assert not res.requires_grad
  
      x = np.array([[1, 2], [3, 4]])
      res = x**2
      assert isinstance(res, np.tensor)
      assert res.requires_grad
  
      x = np.array([[1, 2], [3, 4]], requires_grad=False)
      res = x**2
      assert isinstance(res, np.tensor)
      assert not res.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 13 for calling the TestNumpyIntegration obj's underlying member method code with example usage: obj.test_unary_operators() without return types