diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-01-04 12:33:04 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-01-04 12:33:04 -0500 |
commit | c39a56a07a6603d356733a2716b49c6275f026bf (patch) | |
tree | 67f787cb3a4ca7061d05098f6cbc46f50b9d35ec /numpy/lib | |
parent | 7fbc43b98d59ef982671b456cebc229425ae7e4e (diff) | |
parent | 638a427af0ba0a1093d9945afa7defef61ec13ab (diff) | |
download | numpy-c39a56a07a6603d356733a2716b49c6275f026bf.tar.gz |
Merge pull request #5423 from rgommers/npy-format-2point0-doc
DOC: update npy-format NEP and lib/format.py with version 2.0 descriptio...
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/format.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 67da0d6d1..4ff0a660f 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -128,6 +128,19 @@ Consumers can figure out the number of bytes by multiplying the number of elements given by the shape (noting that ``shape=()`` means there is 1 element) by ``dtype.itemsize``. +Format Version 2.0 +------------------ + +The version 1.0 format only allowed the array header to have a total size of +65535 bytes. This can be exceeded by structured arrays with a large number of +columns. The version 2.0 format extends the header size to 4 GiB. +`numpy.save` will automatically save in 2.0 format if the data requires it, +else it will always use the more compatible 1.0 format. + +The description of the fourth element of the header therefore has become: +"The next 4 bytes form a little-endian unsigned int: the length of the header +data HEADER_LEN." + Notes ----- The ``.npy`` format, including reasons for creating it and a comparison of |