class_docstr: Benchmark the optimizers with smooth, unbounded, functions
class_docstr_tok: ["Benchmark","the","optimizers","with","smooth",",","unbounded",",","functions"]
code: def run_sin_1d(self, methods=None):
      def fun(x):
          return np.sin(x[0])
  
      def der(x):
          return np.array([np.cos(x[0])])
  
      b = _BenchOptimizers(
          "1d sin function", fun=fun, der=der, hess=None
      )
      for i in range(10):
          b.bench_run(np.random.uniform(-2, 2, 1), methods=methods)
      return b
  
imports: import os
  import time
  import inspect
  import json
  import traceback
  from collections import defaultdict
  import numpy
  from .None import test_functions
  from .None import go_benchmark_functions
  from .common import Benchmark, is_xslow, safe_import
  from .lsq_problems import extract_lsq_problems
label_desc: Use image node_id 9 for calling the BenchSmoothUnbounded obj's underlying member method code with example usage: obj.run_sin_1d(methods) and returns: b, np, np