Skip to content

Commit 1a1ece8

Browse files
authored
Type hint, test for ignore_warnings function, typo in header
1 parent 1ffbd3d commit 1a1ece8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fractals/julia_sets.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
https://ddd.uab.cat/pub/pubmat/02141493v43n1/02141493v43n1p27.pdf
1818
1919
Remark: Some overflow runtime warnings are suppressed. This is because of the
20-
way the iterateion loop is implemented, using numpy's efficient computations.
20+
way the iteration loop is implemented, using numpy's efficient computations.
2121
Overflows and infinites are replaced after each step by a large number.
2222
"""
2323

@@ -122,8 +122,12 @@ def show_results(
122122
pyplot.show()
123123

124124

125-
def ignore_overflow_warnings():
126-
# Fine grained filtering will make sure that we know what we are doing
125+
def ignore_overflow_warnings() -> None:
126+
"""
127+
Ignore some overflow and invalid value warnings.
128+
129+
>>> ignore_overflow_warnings()
130+
"""
127131
warnings.filterwarnings(
128132
"ignore", category=RuntimeWarning, message="overflow encountered in multiply"
129133
)

0 commit comments

Comments
 (0)