From 7cfbaf67ce18474c0c01b9e50052863112382742 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 3 Nov 2017 01:03:33 -0700 Subject: MAINT: Add a PyDataType_ISUNSIZED macro This allows us to change how flexible types with no length are represented in future, to allow zero-size dtypes (#8970). --- doc/source/reference/c-api.array.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/source/reference/c-api.array.rst') diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index 79a886e71..7e42d3c5f 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -947,6 +947,12 @@ argument must be a :c:type:`PyObject *` that can be directly interpret Type represents one of the flexible array types ( :c:data:`NPY_STRING`, :c:data:`NPY_UNICODE`, or :c:data:`NPY_VOID` ). +.. c:function:: PyDataType_ISUNSIZED(descr): + + Type has no size information attached, and can be resized. Should only be + called on flexible dtypes. Types that are attached to an array will always + be sized, hence the array form of this macro not existing. + .. c:function:: PyTypeNum_ISUSERDEF(num) .. c:function:: PyDataType_ISUSERDEF(descr) -- cgit v1.2.1