class_docstr: Defines a global optimization benchmark problem.
  
  This abstract class defines the basic structure of a global
  optimization problem. Subclasses should implement the ``fun`` method
  for a particular optimization problem.
  
  Attributes
  ----------
  N : int
      The dimensionality of the problem.
  bounds : sequence
      The lower/upper bounds to be used for minimizing the problem.
      This a list of (lower, upper) tuples that contain the lower and upper
      bounds for the problem.  The problem should not be asked for evaluation
      outside these bounds. ``len(bounds) == N``.
  xmin : sequence
      The lower bounds for the problem
  xmax : sequence
      The upper bounds for the problem
  fglob : float
      The global minimum of the evaluated function.
  global_optimum : sequence
      A list of vectors that provide the locations of the global minimum.
      Note that some problems have multiple global minima, not all of which
      may be listed.
  nfev : int
      the number of function evaluations that the object has been asked to
      calculate.
  change_dimensionality : bool
      Whether we can change the benchmark function `x` variable length (i.e.,
      the dimensionality of the problem)
  custom_bounds : sequence
      a list of tuples that contain lower/upper bounds for use in plotting.
docstr: Changes the dimensionality of the benchmark problem
  
  The dimensionality will only be changed if the problem is suitable
  
  Parameters
  ----------
  ndim : int
         The new dimensionality for the problem.
docstr_tok: ["Changes","the","dimensionality","of","the","benchmark","problem","The","dimensionality","will","only","be","changed","if","the","problem","is","suitable","Parameters","--","--","--","--","--","ndim",":","int","The","new","dimensionality","for","the","problem","."]
code: def change_dimensions(self, ndim):
      """
      Changes the dimensionality of the benchmark problem
  
      The dimensionality will only be changed if the problem is suitable
  
      Parameters
      ----------
      ndim : int
             The new dimensionality for the problem.
      """
  
      if self.change_dimensionality:
          self._dimensions = ndim
      else:
          raise ValueError(
              "dimensionality cannot be changed for this" "problem"
          )
  
file_path: scipy/benchmarks/benchmarks/go_benchmark_functions/go_benchmark.py
imports: import numpy
  from numpy import abs, asarray
  from ..common import safe_import
label_desc: Use image node_id 7 for calling the Benchmark obj's underlying member method code with example usage: obj.change_dimensions(ndim) without return types