MCPcopy Create free account
hub / github.com/numpy/numpy / smallest_normal

Method smallest_normal

numpy/core/getlimits.py:590–610  ·  view source on GitHub ↗

Return the value for the smallest normal. Returns ------- smallest_normal : float Value for the smallest normal. Warns ----- UserWarning If the calculated value for the smallest normal is requested for double-doubl

(self)

Source from the content-addressed store, hash-verified

588
589 @property
590 def smallest_normal(self):
591 """Return the value for the smallest normal.
592
593 Returns
594 -------
595 smallest_normal : float
596 Value for the smallest normal.
597
598 Warns
599 -----
600 UserWarning
601 If the calculated value for the smallest normal is requested for
602 double-double.
603 """
604 # This check is necessary because the value for smallest_normal is
605 # platform dependent for longdouble types.
606 if isnan(self._machar.smallest_normal.flat[0]):
607 warnings.warn(
608 'The value of smallest normal is undefined for double double',
609 UserWarning, stacklevel=2)
610 return self._machar.smallest_normal.flat[0]
611
612 @property
613 def tiny(self):

Callers

nothing calls this directly

Calls 2

isnanFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected