docstr: Update the position matrix of the swarm
  
  This computes the next position in a binary swarm. It compares the
  sigmoid output of the velocity-matrix and compares it with a randomly
  generated matrix.
  
  Parameters
  ----------
  swarm: pyswarms.backend.swarms.Swarm
      a Swarm class
docstr_tok: ["Update","the","position","matrix","of","the","swarm","This","computes","the","next","position","in","a","binary","swarm",".","It","compares","the","sigmoid","output","of","the","velocity-matrix","and","compares","it","with","a","randomly","generated","matrix",".","Parameters","--","--","--","--","--","swarm",":","pyswarms.backend.swarms.Swarm","a","Swarm","class"]
code: def _compute_position(self, swarm):
      """Update the position matrix of the swarm
  
      This computes the next position in a binary swarm. It compares the
      sigmoid output of the velocity-matrix and compares it with a randomly
      generated matrix.
  
      Parameters
      ----------
      swarm: pyswarms.backend.swarms.Swarm
          a Swarm class
      """
      return (
          np.random.random_sample(size=swarm.dimensions)
          < self._sigmoid(swarm.velocity)
      ) * 1
  
file_path: pyswarms/pyswarms/discrete/binary.py
imports: import logging
  import numpy
  import multiprocessing
  from collections import deque
  from ..backend.operators import compute_pbest, compute_objective_function
  from ..backend.topology import Ring
  from ..backend.handlers import BoundaryHandler, VelocityHandler
  from ..base import DiscreteSwarmOptimizer
  from ..utils.reporter import Reporter
label_desc: Use image node_id 3 for calling the BinaryPSO obj's underlying member method code with example usage: obj._compute_position(swarm) and returns: unknown