Skip to content

Commit b27e02c

Browse files
committed
fixed library format issues
1 parent 56e2c9a commit b27e02c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cellular_automata/von_neumann.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
Requirements: numpy, matplotlib
1515
"""
1616

17-
import numpy as np
18-
from matplotlib import animation
17+
import sys
18+
import doctest
19+
1920
import matplotlib.pyplot as plt
21+
from matplotlib import animation
2022
from matplotlib.colors import ListedColormap
23+
import numpy as np
2124

2225

2326
def create_random_grid(
@@ -737,15 +740,11 @@ def quick_demo(rule_name: str = "conway") -> None:
737740

738741

739742
if __name__ == "__main__":
740-
import doctest
741-
742743
# Run doctests
743744
print("Running doctests...")
744745
doctest.testmod(verbose=True)
745746

746747
# Check if this is being run interactively or with specific demo request
747-
import sys
748-
749748
if len(sys.argv) > 1:
750749
# Command line usage: python von_neumann.py demo
751750
if sys.argv[1] == "demo":

0 commit comments

Comments
 (0)