class_docstr: Test for the hashing capability of scalar arrays.
class_docstr_tok: ["Test","for","the","hashing","capability","of","scalar","arrays","."]
docstr: Test that the gradient information is correctly taken into account when hashing
docstr_tok: ["Test","that","the","gradient","information","is","correctly","taken","into","account","when","hashing"]
code: def test_requires_grad_hashing(self):
      """Test that the gradient information is correctly taken into account when hashing"""
      data = [
          np.array(1),
          np.array(2),
          np.array(1, requires_grad=False),
          np.array(3),
      ]
      res = set(data)
      expected = {
          np.array(1, requires_grad=False),
          np.array(1),
          np.array(2),
          np.array(3),
      }
      assert res == expected
  
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 TestScalarHashing obj's underlying member method code with example usage: obj.test_requires_grad_hashing() without return types