class_docstr: Tests for the ScalarSymbolicOp class.
class_docstr_tok: ["Tests","for","the","ScalarSymbolicOp","class","."]
code: def test_init(self):
      base = Operator(1.1, wires=[0])
      scalar = 2.2
      op = TempScalar(base, scalar)
      assert isinstance(op.scalar, float)
      assert op.scalar == 2.2
      assert op.data == (2.2, 1.1)
  
      base = Operator(1.1, wires=[0])
      scalar = [2.2, 3.3]
      op = TempScalar(base, scalar)
      assert isinstance(op.scalar, np.ndarray)
      assert np.all(op.scalar == [2.2, 3.3])
      assert np.all(op.data[0] == op.scalar)
      assert op.data[1] == 1.1
  
imports: from copy import copy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.operation import Operator
  from pennylane.ops.op_math import SymbolicOp, ScalarSymbolicOp
  from pennylane.wires import Wires
label_desc: Use image node_id 1 for calling the TestScalarSymbolicOp obj's underlying member method code with example usage: obj.test_init() without return types