Skip to content

Commit 501e5ed

Browse files
steff456rgommers
authored andcommitted
Fix notes section rendering for some functions
1 parent 4b57941 commit 501e5ed

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

Diff for: src/array_api_stubs/_draft/array_object.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ def __abs__(self: array, /) -> array:
136136
out: array
137137
an array containing the element-wise absolute value. If ``self`` has a real-valued data type, the returned array must have the same data type as ``self``. If ``self`` has a complex floating-point data type, the returned arrayed must have a real-valued floating-point data type whose precision matches the precision of ``self`` (e.g., if ``self`` is ``complex128``, then the returned array must have a ``float64`` data type).
138138
139-
.. note::
140-
Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function :func:`~array_api.abs`.
141-
142139
Notes
143140
-----
144141
142+
.. note::
143+
Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function :func:`~array_api.abs`.
144+
145145
.. versionchanged:: 2022.12
146146
Added complex data type support.
147147
"""

Diff for: src/array_api_stubs/_draft/creation_functions.py

+23
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def asarray(
9898
out: array
9999
an array containing the data from ``obj``.
100100
101+
Notes
102+
-----
103+
101104
.. versionchanged:: 2022.12
102105
Added complex data type support.
103106
"""
@@ -183,6 +186,9 @@ def eye(
183186
out: array
184187
an array where all elements are equal to zero, except for the ``k``\th diagonal, whose values are equal to one.
185188
189+
Notes
190+
-----
191+
186192
.. versionchanged:: 2022.12
187193
Added complex data type support.
188194
"""
@@ -244,6 +250,9 @@ def full(
244250
out: array
245251
an array where every element is equal to ``fill_value``.
246252
253+
Notes
254+
-----
255+
247256
.. versionchanged:: 2022.12
248257
Added complex data type support.
249258
"""
@@ -283,6 +292,9 @@ def full_like(
283292
out: array
284293
an array having the same shape as ``x`` and where every element is equal to ``fill_value``.
285294
295+
Notes
296+
-----
297+
286298
.. versionchanged:: 2022.12
287299
Added complex data type support.
288300
"""
@@ -346,6 +358,8 @@ def linspace(
346358
out: array
347359
a one-dimensional array containing evenly spaced values.
348360
361+
Notes
362+
-----
349363
350364
.. note::
351365
While this specification recommends that this function only return arrays having a floating-point data type, specification-compliant array libraries may choose to support output arrays having an integer data type (e.g., due to backward compatibility concerns). However, function behavior when generating integer output arrays is unspecified and, thus, is implementation-defined. Accordingly, using this function to generate integer output arrays is not portable.
@@ -383,6 +397,9 @@ def meshgrid(*arrays: array, indexing: str = "xy") -> List[array]:
383397
384398
Each returned array should have the same data type as the input arrays.
385399
400+
Notes
401+
-----
402+
386403
.. versionchanged:: 2022.12
387404
Added complex data type support.
388405
"""
@@ -414,6 +431,9 @@ def ones(
414431
out: array
415432
an array containing ones.
416433
434+
Notes
435+
-----
436+
417437
.. versionchanged:: 2022.12
418438
Added complex data type support.
419439
"""
@@ -442,6 +462,9 @@ def ones_like(
442462
out: array
443463
an array having the same shape as ``x`` and filled with ones.
444464
465+
Notes
466+
-----
467+
445468
.. versionchanged:: 2022.12
446469
Added complex data type support.
447470
"""

0 commit comments

Comments
 (0)