MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / ignore_overflow_warnings

Function ignore_overflow_warnings

fractals/julia_sets.py:148–167  ·  view source on GitHub ↗

Ignore some overflow and invalid value warnings. >>> ignore_overflow_warnings()

()

Source from the content-addressed store, hash-verified

146
147
148def ignore_overflow_warnings() -> None:
149 """
150 Ignore some overflow and invalid value warnings.
151
152 >>> ignore_overflow_warnings()
153 """
154 warnings.filterwarnings(
155 "ignore", category=RuntimeWarning, message="overflow encountered in multiply"
156 )
157 warnings.filterwarnings(
158 "ignore",
159 category=RuntimeWarning,
160 message="invalid value encountered in multiply",
161 )
162 warnings.filterwarnings(
163 "ignore", category=RuntimeWarning, message="overflow encountered in absolute"
164 )
165 warnings.filterwarnings(
166 "ignore", category=RuntimeWarning, message="overflow encountered in exp"
167 )
168
169
170if __name__ == "__main__":

Callers 1

julia_sets.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected