@@ -121,7 +121,7 @@ def move_agents(
121121
122122 Parameters
123123 ----------
124- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
124+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
125125 The agents to move
126126 pos : SpaceCoordinate | SpaceCoordinates
127127 The coordinates for each agents. The length of the coordinates must match the number of agents.
@@ -157,7 +157,7 @@ def place_agents(
157157
158158 Parameters
159159 ----------
160- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
160+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
161161 The agents to place in the space
162162 pos : SpaceCoordinate | SpaceCoordinates
163163 The coordinates for each agents. The length of the coordinates must match the number of agents.
@@ -218,9 +218,9 @@ def swap_agents(
218218
219219 Parameters
220220 ----------
221- agents0 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
221+ agents0 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
222222 The first set of agents to swap
223- agents1 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
223+ agents1 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
224224 The second set of agents to swap
225225 inplace : bool, optional
226226 Whether to perform the operation inplace, by default True
@@ -290,9 +290,9 @@ def get_directions(
290290 The starting positions
291291 pos1 : SpaceCoordinate | SpaceCoordinates | None, optional
292292 The ending positions
293- agents0 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
293+ agents0 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
294294 The starting agents
295- agents1 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
295+ agents1 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
296296 The ending agents
297297 normalize : bool, optional
298298 Whether to normalize the vectors to unit norm. By default False
@@ -334,9 +334,9 @@ def get_distances(
334334 The starting positions
335335 pos1 : SpaceCoordinate | SpaceCoordinates | None, optional
336336 The ending positions
337- agents0 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
337+ agents0 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
338338 The starting agents
339- agents1 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
339+ agents1 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
340340 The ending agents
341341
342342 Returns
@@ -369,7 +369,7 @@ def get_neighbors(
369369 The radius(es) of the neighborhood
370370 pos : SpaceCoordinate | SpaceCoordinates | None, optional
371371 The coordinates of the cell to get the neighborhood from, by default None
372- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
372+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
373373 The id of the agents to get the neighborhood from, by default None
374374 include_center : bool, optional
375375 If the center cells or agents should be included in the result, by default False
@@ -391,15 +391,17 @@ def get_neighbors(
391391 def move_to_empty (
392392 self ,
393393 agents : IdsLike
394+ | AbstractAgentSet
394395 | AbstractAgentSetRegistry
396+ | Collection [AbstractAgentSet ]
395397 | Collection [AbstractAgentSetRegistry ],
396398 inplace : bool = True ,
397399 ) -> Self :
398400 """Move agents to empty cells/positions in the space (cells/positions where there isn't any single agent).
399401
400402 Parameters
401403 ----------
402- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
404+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
403405 The agents to move to empty cells/positions
404406 inplace : bool, optional
405407 Whether to perform the operation inplace, by default True
@@ -414,15 +416,17 @@ def move_to_empty(
414416 def place_to_empty (
415417 self ,
416418 agents : IdsLike
419+ | AbstractAgentSet
417420 | AbstractAgentSetRegistry
421+ | Collection [AbstractAgentSet ]
418422 | Collection [AbstractAgentSetRegistry ],
419423 inplace : bool = True ,
420424 ) -> Self :
421425 """Place agents in empty cells/positions in the space (cells/positions where there isn't any single agent).
422426
423427 Parameters
424428 ----------
425- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
429+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
426430 The agents to place in empty cells/positions
427431 inplace : bool, optional
428432 Whether to perform the operation inplace, by default True
@@ -468,7 +472,7 @@ def remove_agents(
468472
469473 Parameters
470474 ----------
471- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
475+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
472476 The agents to remove from the space
473477 inplace : bool, optional
474478 Whether to perform the operation inplace, by default True
@@ -703,7 +707,7 @@ def move_to_available(
703707
704708 Parameters
705709 ----------
706- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry]
710+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry]
707711 The agents to move to available cells/positions
708712 inplace : bool, optional
709713 Whether to perform the operation inplace, by default True
@@ -856,7 +860,9 @@ def get_neighborhood(
856860 radius : int | float | Sequence [int ] | Sequence [float ] | ArrayLike ,
857861 pos : DiscreteCoordinate | DiscreteCoordinates | None = None ,
858862 agents : IdsLike
863+ | AbstractAgentSet
859864 | AbstractAgentSetRegistry
865+ | Collection [AbstractAgentSet ]
860866 | Collection [AbstractAgentSetRegistry ] = None ,
861867 include_center : bool = False ,
862868 ) -> DataFrame :
@@ -870,7 +876,7 @@ def get_neighborhood(
870876 The radius(es) of the neighborhoods
871877 pos : DiscreteCoordinate | DiscreteCoordinates | None, optional
872878 The coordinates of the cell(s) to get the neighborhood from
873- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry], optional
879+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry], optional
874880 The agent(s) to get the neighborhood from
875881 include_center : bool, optional
876882 If the cell in the center of the neighborhood should be included in the result, by default False
@@ -1040,7 +1046,7 @@ def _sample_cells(
10401046 The number of cells to sample. If None, samples the maximum available.
10411047 with_replacement : bool
10421048 If the sampling should be with replacement
1043- condition : Callable[[DiscreteSpaceCapacity], BoolSeries]
1049+ condition : Callable[[DiscreteSpaceCapacity], BoolSeries | np.ndarray ]
10441050 The condition to apply on the capacity
10451051 respect_capacity : bool, optional
10461052 If the capacity should be respected in the sampling.
@@ -1659,9 +1665,9 @@ def _calculate_differences(
16591665 The starting positions
16601666 pos1 : GridCoordinate | GridCoordinates | None
16611667 The ending positions
1662- agents0 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None
1668+ agents0 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None
16631669 The starting agents
1664- agents1 : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None
1670+ agents1 : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None
16651671 The ending agents
16661672
16671673 Returns
@@ -1756,7 +1762,7 @@ def _get_df_coords(
17561762 ----------
17571763 pos : GridCoordinate | GridCoordinates | None, optional
17581764 The positions to get the DataFrame from, by default None
1759- agents : IdsLike | AbstractAgentSetRegistry | Collection[AbstractAgentSetRegistry] | None, optional
1765+ agents : IdsLike | AbstractAgentSet | AbstractAgentSetRegistry | Collection[AbstractAgentSet] | Collection[AbstractAgentSetRegistry] | None, optional
17601766 The agents to get the DataFrame from, by default None
17611767 check_bounds: bool, optional
17621768 If the positions should be checked for out-of-bounds in non-toroidal grids, by default True
0 commit comments