class_docstr: Test for the hashing capability of scalar arrays.
class_docstr_tok: ["Test","for","the","hashing","capability","of","scalar","arrays","."]
docstr: Test that a one dimensional array correctly produces a set via iteration
docstr_tok: ["Test","that","a","one","dimensional","array","correctly","produces","a","set","via","iteration"]
code: def test_create_set_from_array_iteration(self):
      """Test that a one dimensional array correctly produces a set via iteration"""
      data = np.array([1, 2, 1, 3], requires_grad=True)
      res = set(data)
      expected = {
          np.array(1, requires_grad=True),
          np.array(2, requires_grad=True),
          np.array(3, requires_grad=True),
      }
      assert res == expected
  
      data = np.array([1, 2, 1, 3], requires_grad=False)
      res = set(data)
      expected = {
          np.array(1, requires_grad=False),
          np.array(2, requires_grad=False),
          np.array(3, requires_grad=False),
      }
      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 3 for calling the TestScalarHashing obj's underlying member method code with example usage: obj.test_create_set_from_array_iteration() without return types