class_docstr: A Space class for agents, variables and methods
  related to the search space.
class_docstr_tok: ["A","Space","class","for","agents",",","variables","and","methods","related","to","the","search","space","."]
code: def n_variables(self, n_variables: int) -> None:
      if not isinstance(n_variables, int):
          raise e.TypeError("`n_variables` should be an integer")
      if n_variables <= 0:
          raise e.ValueError("`n_variables` should be > 0")
  
      self._n_variables = n_variables
  
imports: from typing import List, Optional, Tuple, Union
  import numpy
  import opytimizer.utils.exception
  from opytimizer.core import Agent
  from opytimizer.utils import logging
label_desc: Use image node_id 5 for calling the Space obj's underlying member method code with example usage: obj.n_variables(n_variables) without return types