Skip to content

Commit e7b7f23

Browse files
edwinsolisfsyurkevi
authored andcommitted
Added sphinx docstring, documented more functions, restructured sidebar
1 parent 2ac1773 commit e7b7f23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+715
-348
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ coverage.xml
4343
docs/api
4444
site/
4545
mkdocs.yml
46+
output-docs/

arrayfire/library/computer_vision.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def gloh(
5353
A tuple containing two elements:
5454
- `Features`: An object holding the detected features, including their locations and scales.
5555
- `Array`: An ArrayFire array containing the GLOH descriptors for the detected features, with each descriptor
56-
having 272 elements.
56+
having 272 elements.
5757
5858
Note
5959
----
@@ -165,7 +165,7 @@ def sift(
165165
A tuple containing:
166166
- An ArrayFire Features object encapsulating the detected keypoints.
167167
- An ArrayFire Array containing the corresponding descriptors for each keypoint. The descriptors are
168-
128-dimensional vectors describing the local appearance around each keypoint.
168+
128-dimensional vectors describing the local appearance around each keypoint.
169169
170170
Note
171171
----

docs/_static/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ a {
66
a:hover {
77
color: darkblue; /* Change link color to dark blue on hover */
88
}
9+
10+
.responsive-img {
11+
max-width: 100%;
12+
height: auto;
13+
}

docs/arrayandmatrixmanipulation.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ArrayFire provides several different methods for manipulating arrays and matrice
1717
Below we provide several examples of these functions and their use.
1818

1919
flat()
20-
======
20+
******
2121
The **flat()** function flattens an array to one dimension:
2222

2323
.. literalinclude:: arrayandmatrixmanipulation.py
@@ -32,7 +32,7 @@ The **flat** function can be called from Python as follows:
3232
af.flat(array) - Python function for flattening an array
3333

3434
flip()
35-
======
35+
******
3636
The **flip()** function flips the contents of an array along a chosen dimension. In the example below, we show the 5x2 array flipped along the zeroth (i.e. within a column) and first (e.g. across rows) axes:
3737

3838

@@ -49,7 +49,7 @@ The **flip** function can be called from Python as follows:
4949

5050

5151
join()
52-
======
52+
******
5353

5454
The **join()** function joins arrays along a specific dimension. The C++ interface can join up to four arrays whereas the C interface supports up to 10 arrays. Here is an example of how to use join an array to itself:
5555

@@ -66,7 +66,7 @@ The **join** function can be called from Python as follows:
6666
af.join(0, array, array1) - Python function for joining arrays along a specified axis
6767

6868
moddims()
69-
=========
69+
*********
7070

7171
The **moddims()** function changes the dimensions of an array without changing its data or order. Note that this function modifies only the metadata associated with the array. It does not modify the content of the array. Here is an example of moddims() converting an 8x1 array into a 2x4 and then back to a 8x1:
7272

@@ -83,7 +83,7 @@ The moddims function has a single form in the Python API:
8383

8484

8585
reorder()
86-
=========
86+
*********
8787
The **reorder()** function modifies the order of data within an array by exchanging data according to the change in dimensionality. The linear ordering of data within the array is preserved.
8888

8989
.. literalinclude:: arrayandmatrixmanipulation.py
@@ -92,7 +92,7 @@ The **reorder()** function modifies the order of data within an array by exchang
9292
:end-before: [manipulation5-endsnippet]
9393

9494
shift()
95-
=======
95+
*******
9696
The **shift()** function shifts data in a circular buffer fashion along a chosen dimension. Consider the following example:
9797

9898

@@ -107,7 +107,7 @@ The shift function can be called from Python as follows:
107107
af.shift(array, (3,2)) - Python function for shifting arrays along specified dimension
108108

109109
tile()
110-
======
110+
******
111111
The **tile()** function repeats an array along the specified dimension. For example below we show how to tile an array along the zeroth and first dimensions of an array:
112112

113113
.. literalinclude:: arrayandmatrixmanipulation.py
@@ -121,7 +121,7 @@ The **tile()** function repeats an array along the specified dimension. For exam
121121

122122

123123
transpose()
124-
===========
124+
***********
125125
The **transpose()** function performs a standard matrix transpose. The input array must have the dimensions of a 2D-matrix.
126126

127127
.. literalinclude:: arrayandmatrixmanipulation.py
@@ -139,6 +139,6 @@ The python interface for transpose is as follows:
139139

140140

141141
array()
142-
=======
142+
*******
143143
**array()** can be used to create a (shallow) copy of a matrix with different dimensions. The total number of elements must remain the same. This function is a wrapper over the moddims() function discussed earlier.
144144

docs/conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
# https://www.sphinx-doc.org/en/master/usage/configuration.html
55
import sys
66
import os
7-
sys.path.insert(0, os.path.abspath('../..'))
8-
9-
7+
sys.path.insert(0, os.path.abspath('..'))
108

119
# -- Project information -----------------------------------------------------
1210
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1311

1412
project = 'ArrayFire'
15-
copyright = '2024, ArrayFire'
13+
copyright = '2025, ArrayFire'
1614
author = 'ArrayFire'
1715
release = ''
1816

@@ -38,6 +36,7 @@
3836
html_theme = 'sphinxawesome_theme'
3937
html_static_path = ['_static']
4038
html_permalinks = False
39+
html_logo = "_static/../images/arrayfire_icon.png"
4140

4241
# -- Suppress specific warnings --------------------------------------------
4342

0 commit comments

Comments
 (0)