MCPcopy Create free account
hub / github.com/ipython/ipython / _get_normalization_factor

Method _get_normalization_factor

IPython/lib/display.py:197–200  ·  view source on GitHub ↗
(max_abs_value, normalize)

Source from the content-addressed store, hash-verified

195
196 @staticmethod
197 def _get_normalization_factor(max_abs_value, normalize):
198 if not normalize and max_abs_value > 1:
199 raise ValueError('Audio data must be between -1 and 1 when normalize=False.')
200 return max_abs_value if normalize else 1
201
202 def _data_and_metadata(self):
203 """shortcut for returning metadata with url information, if defined"""

Calls

no outgoing calls

Tested by

no test coverage detected