Skip to content

Commit 94efe95

Browse files
committed
implemented more fixes
1 parent 098d8e0 commit 94efe95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cellular_automata/von_neumann.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def apply_cellular_automaton_rules(
177177
... ages, birth_neighbor_counts={2},
178178
... survival_neighbor_counts={2, 3}, use_wraparound=False
179179
... )
180-
>>> bool(new_ages[0, 0] > 0) # corner should be born (2 neighbors: right and down)
180+
>>> bool(new_ages[0, 0] > 0) # corner should be born
181181
True
182182
183183
>>> # Test aging of dead cells
@@ -189,7 +189,7 @@ def apply_cellular_automaton_rules(
189189
>>> bool(result[0, 0] == 3) # should age from 2 to 3
190190
True
191191
192-
>>> apply_cellular_automaton_rules(np.array([1, 2]), {1}, {1}) # doctest: +IGNORE_EXCEPTION_DETAIL
192+
>>> apply_cellular_automaton_rules(np.array([1, 2]), {1}, {1})
193193
Traceback (most recent call last):
194194
ValueError: current_ages must be a 2D array
195195
"""
@@ -272,7 +272,7 @@ def simulate_von_neumann_cellular_automaton(
272272
>>> all(grid.shape == (5, 5) for grid in result)
273273
True
274274
275-
>>> simulate_von_neumann_cellular_automaton(generations=0) # doctest: +IGNORE_EXCEPTION_DETAIL
275+
>>> simulate_von_neumann_cellular_automaton(generations=0)
276276
Traceback (most recent call last):
277277
ValueError: generations must be positive
278278
"""
@@ -632,7 +632,7 @@ def demo_randomized() -> None:
632632
def demo_statistics() -> None:
633633
"""Example 5: Print statistics about automaton evolution."""
634634
try:
635-
final_state = simulate_cellular_automaton(
635+
final_state = visualize_cellular_automaton(
636636
rule_b=[3],
637637
rule_s=[2, 3],
638638
size=50,

0 commit comments

Comments
 (0)