From d261472429892459d686fd645b0f4d7d990a6e0b Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 13 Jul 2023 10:22:09 -0400 Subject: [PATCH] add note about implicit tuple to list conversion on write/read --- docs/asdf/features.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/asdf/features.rst b/docs/asdf/features.rst index abfc32ae3..724b25ab8 100644 --- a/docs/asdf/features.rst +++ b/docs/asdf/features.rst @@ -32,6 +32,14 @@ and reading trees, see :ref:`overview`. Integers and floats of up to 64 bits can be stored inside of :mod:`numpy` arrays (see below). +.. note:: + + The ASDF standard does not have an immutable sequence type that maps directly + to Python's :class:`tuple`. Following the behavior of + pyyaml, asdf writes tuples as YAML sequences, which when loaded + are converted to lists. If round-tripping of tuples is important + to your application see the :ref:`extending` to write a custom extension + to save and load tuples. One of the key features of `asdf` is its ability to serialize :mod:`numpy` arrays. This is discussed in detail in :ref:`array-data`.