Skip to content

Commit 95809a6

Browse files
authored
Replace recommonmark with MyST, fix all Sphinx issues (#72)
1 parent c0d6472 commit 95809a6

33 files changed

+567
-502
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sphinx==3.1.1
22
sphinx-material==0.0.30
3-
recommonmark
3+
myst-parser
44
sphinx_markdown_tables
55
sphinx_copybutton

spec/API_specification/array_object.md

Lines changed: 156 additions & 132 deletions
Large diffs are not rendered by default.

spec/API_specification/broadcasting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _broadcasting:
1+
(broadcasting)=
22

33
# Broadcasting
44

spec/API_specification/casting.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/API_specification/constants.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ A conforming implementation of the array API standard must provide and support t
66

77
<!-- NOTE: please keep the constants in alphabetical order -->
88

9+
## Objects in API
10+
911
### <a name="e" href="#e">#</a> e
1012

1113
Euler's constant.

spec/API_specification/creation_functions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ A conforming implementation of the array API standard must provide and support t
77
- Positional parameters must be [positional-only](https://www.python.org/dev/peps/pep-0570/) parameters. Positional-only parameters have no externally-usable name. When a function accepting positional-only parameters is called, positional arguments are mapped to these parameters based solely on their order.
88
- Optional parameters must be [keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.
99

10+
## Objects in API
11+
1012
<!-- NOTE: please keep the functions in alphabetical order -->
1113

1214
### <a name="arange" href="#arange">#</a> arange(start, /, *, stop=None, step=1, dtype=None)
@@ -23,9 +25,10 @@ Returns evenly spaced values within the half-open interval `[start, stop)` as a
2325

2426
- the end of the interval. Default: `None`.
2527

26-
.. note::
28+
```{note}
2729
28-
This function cannot guarantee that the interval does not include the `stop` value in those cases where `step` is not an integer and floating-point rounding errors affect the length of the output array.
30+
This function cannot guarantee that the interval does not include the `stop` value in those cases where `step` is not an integer and floating-point rounding errors affect the length of the output array.
31+
```
2932

3033
- **step**: _Union\[ int, float ]_
3134

spec/API_specification/data_types.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
.. _data-types:
1+
(data-types)=
22

33
# Data Types
44

55
> Array API specification for supported data types.
66
77
A conforming implementation of the array API standard must provide and support the following data types.
88

9-
.. note::
9+
```{note}
1010
11-
Data types ("dtypes") are objects that can be used as `dtype` specifiers in functions and methods (e.g., `zeros((2, 3), dtype=float32)`). A conforming implementation may add methods or attributes to data type objects; however, these methods and attributes are not included in this specification.
11+
Data types ("dtypes") are objects that can be used as `dtype` specifiers in functions and methods (e.g., `zeros((2, 3), dtype=float32)`). A conforming implementation may add methods or attributes to data type objects; however, these methods and attributes are not included in this specification.
12+
```
1213

13-
.. note::
14+
```{note}
1415
15-
Implementations may provide other ways to specify data types (e.g.,
16-
`zeros((2, 3), dtype='f4')`); however, these are not included in this specification.
16+
Implementations may provide other ways to specify data types (e.g.,
17+
`zeros((2, 3), dtype='f4')`); however, these are not included in this specification.
18+
```
1719

1820
A conforming implementation of the array API standard may provide and support additional data types beyond those described in this specification.
1921

2022
A conforming implementation of the array API standard must define a default floating-point data type (either `float32` or `float64`).
2123

22-
.. note::
24+
```{note}
2325
24-
The default floating-point data type should be clearly defined in a conforming library's documentation.
26+
The default floating-point data type should be clearly defined in a conforming library's documentation.
27+
```
2528

2629
A conforming implementation of the array API standard must define a default data type for an array index (either `int32` or `int64`).
2730

28-
.. note::
31+
```{note}
2932
30-
The default array index data type should be clearly defined in a conforming library's documentation.
33+
The default array index data type should be clearly defined in a conforming library's documentation.
34+
```
3135

3236

3337
## bool

spec/API_specification/elementwise_functions.md

Lines changed: 132 additions & 125 deletions
Large diffs are not rendered by default.

spec/API_specification/function_and_method_signatures.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _function-and-method-signatures:
1+
(function-and-method-signatures)=
22

33
# Function and method signatures
44

@@ -13,12 +13,13 @@ Function signatures in this standard adhere to the following:
1313
_Rationale: existing libraries have incompatible conventions, and using names
1414
of positional parameters is not normal/recommended practice._
1515

16-
.. note::
16+
```{note}
1717
18-
Positional-only parameters are only available in Python >= 3.8. Libraries
19-
still supporting 3.7 or 3.6 may consider making the API standard-compliant
20-
namespace >= 3.8. Alternatively, they can add guidance to their users in the
21-
documentation to use the functions as if they were positional-only.
18+
Positional-only parameters are only available in Python >= 3.8. Libraries
19+
still supporting 3.7 or 3.6 may consider making the API standard-compliant
20+
namespace >= 3.8. Alternatively, they can add guidance to their users in the
21+
documentation to use the functions as if they were positional-only.
22+
```
2223
2324
2. Optional parameters must be
2425
[keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.

spec/API_specification/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ API specification
1212
indexing
1313
data_types
1414
type_promotion
15-
casting
1615
broadcasting
1716
creation_functions
1817
manipulation_functions

0 commit comments

Comments
 (0)