MCPcopy Index your code
hub / github.com/ipython/ipython / _get_normalization_factor

Method _get_normalization_factor

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

Source from the content-addressed store, hash-verified

210
211 @staticmethod
212 def _get_normalization_factor(max_abs_value, normalize):
213 if not normalize and max_abs_value > 1:
214 raise ValueError('Audio data must be between -1 and 1 when normalize=False.')
215 return max_abs_value if normalize else 1
216
217 def _data_and_metadata(self):
218 """shortcut for returning metadata with url information, if defined"""

Calls

no outgoing calls

Tested by

no test coverage detected