pydicom.values.convert_DS_string(byte_string: bytes, is_little_endian: bool, struct_format: str | None = None) DSfloat | MutableSequence[DSfloat] | float64 | ndarray[source]

Return a decoded ‘DS’ value.

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

  • byte_string (bytes) – The encoded ‘DS’ element value.

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

  • struct_format (str, optional) – Not used.


If use_DS_decimal is False (default), returns a DSfloat or list of them

If use_DS_decimal is True, returns a DSdecimal or list of them

If use_DS_numpy is True, returns a numpy.float64 or a numpy.ndarray of them

Return type:

DSfloat, DSdecimal, numpy.float64, MultiValue of DSfloat/DSdecimal or numpy.ndarray of numpy.float64