diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index be0f85c..c5a31d5 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -183,7 +183,7 @@ def test_set_matplotlib_formats_kwargs(): ip = get_ipython() cfg = _get_inline_config() cfg.print_figure_kwargs.update(dict(foo='bar')) - kwargs = dict(quality=10) + kwargs = dict(dpi=150) display.set_matplotlib_formats('png', **kwargs) formatter = ip.display_formatter.formatters['image/png'] f = formatter.lookup_by_type(Figure) diff --git a/IPython/lib/display.py b/IPython/lib/display.py index e8b8a44..012b3ab 100644 --- a/IPython/lib/display.py +++ b/IPython/lib/display.py @@ -8,6 +8,8 @@ from os import walk, sep, fsdecode from IPython.core.display import DisplayObject, TextDisplayObject +from typing import Tuple + __all__ = ['Audio', 'IFrame', 'YouTubeVideo', 'VimeoVideo', 'ScribdDocument', 'FileLink', 'FileLinks', 'Code'] @@ -159,7 +161,7 @@ class Audio(DisplayObject): return val @staticmethod - def _validate_and_normalize_with_numpy(data, normalize): + def _validate_and_normalize_with_numpy(data, normalize) -> Tuple[bytes, int]: import numpy as np data = np.array(data, dtype=float) @@ -178,8 +180,7 @@ class Audio(DisplayObject): max_abs_value = np.max(np.abs(data)) normalization_factor = Audio._get_normalization_factor(max_abs_value, normalize) scaled = data / normalization_factor * 32767 - return scaled.astype('`_. +contributions to this milestone `on github `__. Thanks as well to organisations, QuantStack for working on debugger compatibility for Xeus_python, and the `D. E. Shaw group @@ -53,7 +55,7 @@ Thanks ------ Many thanks to all the contributors to this release you can find all individual -contribution to this milestone `on github `_. +contribution to this milestone `on github `__. .. _version 720: