Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Type hint, test for ignore_warnings function, typo in header
  • Loading branch information
alexn11 authored May 7, 2021
commit 1a1ece8dedd029a1483e7ee52ceb1b10817aa334
10 changes: 7 additions & 3 deletions fractals/julia_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
https://ddd.uab.cat/pub/pubmat/02141493v43n1/02141493v43n1p27.pdf

Remark: Some overflow runtime warnings are suppressed. This is because of the
way the iterateion loop is implemented, using numpy's efficient computations.
way the iteration loop is implemented, using numpy's efficient computations.
Overflows and infinites are replaced after each step by a large number.
"""

Expand Down Expand Up @@ -122,8 +122,12 @@ def show_results(
pyplot.show()


def ignore_overflow_warnings():
# Fine grained filtering will make sure that we know what we are doing
def ignore_overflow_warnings() -> None:
"""
Ignore some overflow and invalid value warnings.

>>> ignore_overflow_warnings()
"""
warnings.filterwarnings(
"ignore", category=RuntimeWarning, message="overflow encountered in multiply"
)
Expand Down