File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 14
14
Requirements: numpy, matplotlib
15
15
"""
16
16
17
- import numpy as np
18
- from matplotlib import animation
17
+ import sys
18
+ import doctest
19
+
19
20
import matplotlib .pyplot as plt
21
+ from matplotlib import animation
20
22
from matplotlib .colors import ListedColormap
23
+ import numpy as np
21
24
22
25
23
26
def create_random_grid (
@@ -737,15 +740,11 @@ def quick_demo(rule_name: str = "conway") -> None:
737
740
738
741
739
742
if __name__ == "__main__" :
740
- import doctest
741
-
742
743
# Run doctests
743
744
print ("Running doctests..." )
744
745
doctest .testmod (verbose = True )
745
746
746
747
# Check if this is being run interactively or with specific demo request
747
- import sys
748
-
749
748
if len (sys .argv ) > 1 :
750
749
# Command line usage: python von_neumann.py demo
751
750
if sys .argv [1 ] == "demo" :
You can’t perform that action at this time.
0 commit comments