code: def dtt2dict(dtt):
      """Create info dictionary from numpy type"""
      info = np.finfo(dtt)
      return dict(
          min=info.min,
          max=info.max,
          nexp=info.nexp,
          nmant=info.nmant,
          minexp=info.minexp,
          maxexp=info.maxexp,
          width=np.dtype(dtt).itemsize,
      )
  
file_path: nibabel/nibabel/tests/test_floating.py
imports: import sys
  from contextlib import nullcontext
  import numpy
  import pytest
  from packaging.version import Version
  from ..casting import FloatingError, _check_maxexp, _check_nmant, ceil_exact, floor_exact, floor_log2, have_binary128, longdouble_precision_improved, ok_floats, on_powerpc, sctypes, type_info
  from ..testing import suppress_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: dtt2dict(dtt) and returns: dict