class_docstr: Test the SPSA optimizer.
docstr: Test function when there is only one float parameter that doesn't
  require grad.
docstr_tok: ["Test","function","when","there","is","only","one","float","parameter","that","doesn't","require","grad","."]
code: def test_parameter_not_an_array(self):
      """Test function when there is only one float parameter that doesn't
      require grad."""
      dev = qml.device("default.qubit", wires=1)
  
      @qml.qnode(dev)
      def circuit(a):
          qml.RX(a, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      def cost(a):
          return circuit(a)
  
      spsa_opt = qml.SPSAOptimizer(maxiter=10)
      params = 0.5
  
      res = spsa_opt.step(cost, params)
  
      assert isinstance(res, float)
      assert res == params
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 13 for calling the TestSPSAOptimizer obj's underlying member method code with example usage: obj.test_parameter_not_an_array() and returns: qml, circuit