class_docstr: An EFO class, inherited from Optimizer.
  
  This is the designed class to define EFO-related
  variables and methods.
  
  References:
      H. Abedinpourshotorban et al.
      Electromagnetic field optimization: A physics-inspired metaheuristic optimization algorithm.
      Swarm and Evolutionary Computation (2016).
class_docstr_tok: ["An","EFO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","EFO-related","variables","and","methods",".","References",":","H.","Abedinpourshotorban","et","al",".","Electromagnetic","field","optimization",":","A","physics-inspired","metaheuristic","optimization","algorithm",".","Swarm","and","Evolutionary","Computation","(","2016",")","."]
code: def negative_field(self, negative_field: float) -> None:
      if not isinstance(negative_field, (float, int)):
          raise e.TypeError(
              "`negative_field` should be a float or integer"
          )
      if negative_field < 0 or negative_field > 1:
          raise e.ValueError(
              "`negative_field` should be between 0 and 1"
          )
      if negative_field + self.positive_field > 1:
          raise e.ValueError(
              "`negative_field` + `positive_field` should not exceed 1"
          )
  
      self._negative_field = negative_field
  
imports: import copy
  from typing import Any, Dict, Optional, Tuple
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 5 for calling the EFO obj's underlying member method code with example usage: obj.negative_field(negative_field) without return types