summaryrefslogtreecommitdiff
path: root/docs/library/array.rst
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2021-08-12 13:56:13 +1000
committerDamien George <damien@micropython.org>2021-08-13 20:31:32 +1000
commit218606351c6f9688a3f90dad791bcb2109adcf1b (patch)
treede051ee21f5ccac3aaccfe3865ab5818f81fca37 /docs/library/array.rst
parent671f012306e0942cbe59fcd43e25e67c289da351 (diff)
docs: Rename ufoo.rst to foo.rst.
This is a simple rename of the files, no content changes (other than updating index.rst to use the new paths) Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library/array.rst')
-rw-r--r--docs/library/array.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/library/array.rst b/docs/library/array.rst
new file mode 100644
index 000000000..9fa82ff31
--- /dev/null
+++ b/docs/library/array.rst
@@ -0,0 +1,29 @@
+:mod:`uarray` -- arrays of numeric data
+=======================================
+
+.. module:: uarray
+ :synopsis: efficient arrays of numeric data
+
+|see_cpython_module| :mod:`python:array`.
+
+Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``,
+``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the
+floating-point support).
+
+Classes
+-------
+
+.. class:: array(typecode, [iterable])
+
+ Create array with elements of given type. Initial contents of the
+ array are given by *iterable*. If it is not provided, an empty
+ array is created.
+
+ .. method:: append(val)
+
+ Append new element *val* to the end of array, growing it.
+
+ .. method:: extend(iterable)
+
+ Append new elements as contained in *iterable* to the end of
+ array, growing it.