Skip to content

Commit

Permalink
clarified manual section on sort
Browse files Browse the repository at this point in the history
  • Loading branch information
v923z committed Nov 4, 2019
1 parent b4f4331 commit 5f8a5d8
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 48 deletions.
4 changes: 2 additions & 2 deletions docs/manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Zoltán Vörös'

# The full version, including alpha/beta/rc tags
release = '0.25'
release = '0.251'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -64,4 +64,4 @@
(master_doc, 'ulab-manual.tex', 'Micropython ulab documentation',
'Zoltán Vörös', 'manual'),
]


9 changes: 5 additions & 4 deletions docs/manual/source/ulab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1896,10 +1896,11 @@ https://docs.scipy.org/doc/numpy/reference/generated/numpy.sort.html?highlight=s

The sort function takes an ndarray, and sorts it along the specified
axis using a heap sort algorithm. Sorting takes place in place, without
auxiliary storage. The ``axis`` keyword argument, just as in
`diff <#diff>`__, takes on the possible values of -1 (the last axis, in
``ulab`` equivalent to the second axis, and this also happens to be the
default value), 0, or 1.
auxiliary storage. The ``axis`` keyword argument takes on the possible
values of -1 (the last axis, in ``ulab`` equivalent to the second axis,
and this also happens to be the default value), 0, 1, or ``None``. The
first three cases are identical to those in `diff <#diff>`__, while the
last one flattens the array before sorting.

**WARNING:** ``numpy`` defines the ``kind``, and ``order`` keyword
arguments that are not implemented here. The function in ``ulab`` always
Expand Down
4 changes: 2 additions & 2 deletions docs/ulab-change-log.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Mon, 04 Nov 2019

version
version 0.25

added first implementation of sort, and fixed section on compilating the module in the manual
added first implementation of sort, and fixed section on compiling the module in the manual

Thu, 31 Oct 2019

Expand Down
117 changes: 103 additions & 14 deletions docs/ulab-manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-29T07:27:46.920873Z",
"start_time": "2019-10-29T07:27:46.075585Z"
"end_time": "2019-11-04T18:52:11.229037Z",
"start_time": "2019-11-04T18:52:10.081797Z"
}
},
"outputs": [
Expand All @@ -22,6 +22,95 @@
"%pylab inline"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-04T21:02:40.581322Z",
"start_time": "2019-11-04T21:02:40.568695Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting manual/source/conf.py\n"
]
}
],
"source": [
"%%writefile manual/source/conf.py\n",
"# Configuration file for the Sphinx documentation builder.\n",
"#\n",
"# This file only contains a selection of the most common options. For a full\n",
"# list see the documentation:\n",
"# http://www.sphinx-doc.org/en/master/config\n",
"\n",
"# -- Path setup --------------------------------------------------------------\n",
"\n",
"# If extensions (or modules to document with autodoc) are in another directory,\n",
"# add these directories to sys.path here. If the directory is relative to the\n",
"# documentation root, use os.path.abspath to make it absolute, like shown here.\n",
"#\n",
"# import os\n",
"# import sys\n",
"# sys.path.insert(0, os.path.abspath('.'))\n",
"\n",
"\n",
"# -- Project information -----------------------------------------------------\n",
"\n",
"project = 'micropython-ulab'\n",
"copyright = '2019, Zoltán Vörös'\n",
"author = 'Zoltán Vörös'\n",
"\n",
"# The full version, including alpha/beta/rc tags\n",
"release = '0.251'\n",
"\n",
"\n",
"# -- General configuration ---------------------------------------------------\n",
"\n",
"# Add any Sphinx extension module names here, as strings. They can be\n",
"# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n",
"# ones.\n",
"extensions = [\n",
"]\n",
"\n",
"# Add any paths that contain templates here, relative to this directory.\n",
"templates_path = ['_templates']\n",
"\n",
"# List of patterns, relative to source directory, that match files and\n",
"# directories to ignore when looking for source files.\n",
"# This pattern also affects html_static_path and html_extra_path.\n",
"exclude_patterns = []\n",
"\n",
"\n",
"# -- Options for HTML output -------------------------------------------------\n",
"\n",
"# The theme to use for HTML and HTML Help pages. See the documentation for\n",
"# a list of builtin themes.\n",
"#\n",
"html_theme = 'sphinx_rtd_theme'\n",
"\n",
"# Add any paths that contain custom static files (such as style sheets) here,\n",
"# relative to this directory. They are copied after the builtin static files,\n",
"# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n",
"html_static_path = ['_static']\n",
"\n",
"master_doc = 'index'\n",
"\n",
"author=u'Zoltán Vörös'\n",
"copyright=author\n",
"language='en'\n",
"\n",
"latex_documents = [\n",
"(master_doc, 'ulab-manual.tex', 'Micropython ulab documentation', \n",
"'Zoltán Vörös', 'manual'),\n",
"]\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -31,11 +120,11 @@
},
{
"cell_type": "code",
"execution_count": 240,
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-04T17:52:52.659236Z",
"start_time": "2019-11-04T17:52:46.368981Z"
"end_time": "2019-11-04T21:03:19.810768Z",
"start_time": "2019-11-04T21:03:16.524467Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -207,8 +296,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-29T07:27:51.405676Z",
"start_time": "2019-10-29T07:27:51.401636Z"
"end_time": "2019-11-04T20:57:36.730820Z",
"start_time": "2019-11-04T20:57:36.723446Z"
}
},
"outputs": [],
Expand All @@ -225,8 +314,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-29T07:27:54.591594Z",
"start_time": "2019-10-29T07:27:54.554458Z"
"end_time": "2019-11-04T20:57:38.576560Z",
"start_time": "2019-11-04T20:57:38.521927Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -2721,18 +2810,18 @@
"\n",
"numpy: https://docs.scipy.org/doc/numpy/reference/generated/numpy.sort.html?highlight=sort#numpy.sort\n",
"\n",
"The sort function takes an ndarray, and sorts it along the specified axis using a heap sort algorithm. Sorting takes place in place, without auxiliary storage. The `axis` keyword argument, just as in [diff](#diff), takes on the possible values of -1 (the last axis, in `ulab` equivalent to the second axis, and this also happens to be the default value), 0, or 1.\n",
"The sort function takes an ndarray, and sorts it along the specified axis using a heap sort algorithm. Sorting takes place in place, without auxiliary storage. The `axis` keyword argument takes on the possible values of -1 (the last axis, in `ulab` equivalent to the second axis, and this also happens to be the default value), 0, 1, or `None`. The first three cases are identical to those in [diff](#diff), while the last one flattens the array before sorting. \n",
"\n",
"**WARNING:** `numpy` defines the `kind`, and `order` keyword arguments that are not implemented here. The function in `ulab` always takes heap sort, and since `ulab` does not have the concept of data fields, the `order` keyword argument has no meaning in our case."
]
},
{
"cell_type": "code",
"execution_count": 238,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-04T17:47:59.943970Z",
"start_time": "2019-11-04T17:47:59.932065Z"
"end_time": "2019-11-04T20:57:45.942859Z",
"start_time": "2019-11-04T20:57:45.753801Z"
}
},
"outputs": [
Expand Down
38 changes: 12 additions & 26 deletions docs/ulab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"cells": [
{
"cell_type": "code",
"execution_count": 84,
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-29T06:45:19.578063Z",
"start_time": "2019-10-29T06:45:17.758444Z"
"end_time": "2019-11-04T18:54:53.887135Z",
"start_time": "2019-11-04T18:54:53.590728Z"
}
},
"outputs": [
Expand Down Expand Up @@ -8011,11 +8011,10 @@
},
{
"cell_type": "code",
"execution_count": 625,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-04T17:46:54.898750Z",
"start_time": "2019-11-04T17:46:53.501136Z"
"start_time": "2019-11-04T18:37:33.368Z"
},
"scrolled": false
},
Expand All @@ -8024,21 +8023,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.\n",
"Including User C Module from ../../../ulab/code\n",
"GEN build/genhdr/moduledefs.h\n",
"GEN build/genhdr/qstr.i.last\n",
"GEN build/genhdr/qstr.split\n",
"GEN build/genhdr/qstrdefs.collected.h\n",
"QSTR not updated\n",
"CC ../../py/objmodule.c\n",
"CC ../../../ulab/code/numerical.c\n",
"CC ../../../ulab/code/ulab.c\n",
"LINK micropython\n",
" text\t data\t bss\t dec\t hex\tfilename\n",
" 2117\t 6862\t 0\t 8979\t 2313\tbuild/build/frozen_mpy.o\n",
" 34\t 0\t 0\t 34\t 22\tbuild/build/frozen.o\n",
" 496101\t 58424\t 2104\t 556629\t 87e55\tmicropython\n"
"Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.\r\n",
"Including User C Module from ../../../ulab/code\r\n"
]
}
],
Expand Down Expand Up @@ -8169,11 +8155,11 @@
},
{
"cell_type": "code",
"execution_count": 628,
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-04T17:52:26.414738Z",
"start_time": "2019-11-04T17:52:26.400755Z"
"end_time": "2019-11-04T20:54:51.311558Z",
"start_time": "2019-11-04T20:54:51.305732Z"
}
},
"outputs": [
Expand All @@ -8190,9 +8176,9 @@
"\n",
"Mon, 04 Nov 2019\n",
"\n",
"version\n",
"version 0.25\n",
"\n",
" added first implementation of sort, and fixed section on compilating the module in the manual\n",
" added first implementation of sort, and fixed section on compiling the module in the manual\n",
"\n",
"Thu, 31 Oct 2019\n",
"\n",
Expand Down

0 comments on commit 5f8a5d8

Please sign in to comment.