summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-03-15 18:15:31 -0600
committerCharles Harris <charlesr.harris@gmail.com>2014-03-15 18:15:31 -0600
commit403c26a8a569b357d228e7aff2025965f444f9ca (patch)
tree74b557d406c8fcd0aea52803389bba9cbc8c4bd1 /doc/source
parent17227ce130cae09f03c55df1ed22798be901c7ff (diff)
parent68179d562294ee6c75ebe6dbbb5c57f0acb4fcaa (diff)
downloadnumpy-403c26a8a569b357d228e7aff2025965f444f9ca.tar.gz
Merge pull request #4067 from hmeine/master
explain character codes of dtype.kind
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/arrays.dtypes.rst12
-rw-r--r--doc/source/reference/c-api.types-and-structures.rst4
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/source/reference/arrays.dtypes.rst b/doc/source/reference/arrays.dtypes.rst
index 2fc1add99..797f1f6f8 100644
--- a/doc/source/reference/arrays.dtypes.rst
+++ b/doc/source/reference/arrays.dtypes.rst
@@ -220,16 +220,20 @@ One-character strings
Array-protocol type strings (see :ref:`arrays.interface`)
The first character specifies the kind of data and the remaining
- characters specify how many bytes of data. The supported kinds are
+ characters specify the number of bytes per item. The item size may
+ be ignored for some kinds (i.e., boolean, object), rounded to the
+ next supported size (float, complex), or interpreted as the number
+ of characters (Unicode). The supported kinds are
================ ========================
- ``'b'`` Boolean
+ ``'b'`` boolean
``'i'`` (signed) integer
``'u'`` unsigned integer
``'f'`` floating-point
``'c'`` complex-floating point
- ``'S'``, ``'a'`` string
- ``'U'`` unicode
+ ``'O'`` (Python) objects
+ ``'S'``, ``'a'`` (byte-)string
+ ``'U'`` Unicode
``'V'`` raw data (:class:`void`)
================ ========================
diff --git a/doc/source/reference/c-api.types-and-structures.rst b/doc/source/reference/c-api.types-and-structures.rst
index d26ed56cb..f1e216a5c 100644
--- a/doc/source/reference/c-api.types-and-structures.rst
+++ b/doc/source/reference/c-api.types-and-structures.rst
@@ -1119,8 +1119,8 @@ PyArrayInterface
A character indicating what kind of array is present according to the
typestring convention with 't' -> bitfield, 'b' -> Boolean, 'i' ->
signed integer, 'u' -> unsigned integer, 'f' -> floating point, 'c' ->
- complex floating point, 'O' -> object, 'S' -> string, 'U' -> unicode,
- 'V' -> void.
+ complex floating point, 'O' -> object, 'S' -> (byte-)string, 'U' ->
+ unicode, 'V' -> void.
.. cmember:: int PyArrayInterface.itemsize