# pydicom.values.convert_IS_string

pydicom.values.convert_IS_string(byte_string: bytes, is_little_endian: bool, struct_format: str | None = None) → IS | MutableSequence[IS] | int64 | ndarray

  Return a decoded ‘IS’ value.

  Changed in version 2.0: The option to return numpy values was added.

  Parameters:

    - byte_string (bytes) – The encoded ‘IS’ element value.

    - is_little_endian (bool) – `True` if the value is encoded as little endian, `False` otherwise.

    - struct_format (str, optional) – Not used.

  Returns:

    If `use_IS_numpy` is `False` (default), returns a single `IS` or a list of them

    If `use_IS_numpy` is `True`, returns a single `numpy.int64` or a `ndarray` of them

  Return type:

    `IS` or MultiValue of them, or `numpy.int64` or `ndarray` of them

  Raises:

    - ValueError – If `use_IS_numpy` is `True` and the string contains non-valid characters

    - ImportError – If `use_IS_numpy` is `True` and numpy is not available