summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-10-01 18:00:22 -0700
committerEric Wieser <wieser.eric@gmail.com>2017-10-01 19:00:31 -0700
commitb6d2cd3870ba832973f85057d8d4735c99f18baa (patch)
treee90583c78fde4dc9236e5248d7234717e423fbc6
parent5b5c100b2d192b72c76c71c2aec720c0b2500c08 (diff)
downloadnumpy-b6d2cd3870ba832973f85057d8d4735c99f18baa.tar.gz
DOC: Add release notes for 0-size dtypes
-rw-r--r--doc/release/1.14.0-notes.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/release/1.14.0-notes.rst b/doc/release/1.14.0-notes.rst
index 624886eb1..a4b61e038 100644
--- a/doc/release/1.14.0-notes.rst
+++ b/doc/release/1.14.0-notes.rst
@@ -247,6 +247,23 @@ common cache line size. This makes ``npy`` files easier to use in
programs which open them with ``mmap``, especially on Linux where an
``mmap`` offset must be a multiple of the page size.
+Better support for empty structured and string types
+----------------------------------------------------
+Structured types can contain zero fields, and string dtypes can contain zero
+characters. Zero-length strings still cannot be created directly, and must be
+constructed through structured dtypes:
+
+ str0 = np.empty(10, np.dtype([('v', str, N)]))['v']
+ void0 = np.empty(10, np.void)
+
+It was always possible to work with these, but the following operations are
+now supported for these arrays:
+
+ * `arr.sort()`
+ * `arr.view(bytes)`
+ * `arr.resize(...)`
+ * `pickle.dumps(arr)`
+
Changes
=======