Skip to content

Commit 2aed00c

Browse files
authored
Merge pull request #347 from steff456/constants-rst
PR: Transform constants.md to rst format
2 parents 85b5499 + 69f453c commit 2aed00c

File tree

3 files changed

+49
-39
lines changed

3 files changed

+49
-39
lines changed

spec/API_specification/constants.md

-39
This file was deleted.

spec/API_specification/constants.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Constants
2+
=========
3+
4+
Array API specification for constants.
5+
6+
A conforming implementation of the array API standard must provide and support the following constants adhering to the following conventions.
7+
8+
- Each constant must have a Python floating-point data type (i.e., ``float``) and be provided as a Python scalar value.
9+
10+
Objects in API
11+
--------------
12+
13+
.. currentmodule:: signatures.constants
14+
15+
..
16+
NOTE: please keep the functions in alphabetical order
17+
18+
.. autosummary::
19+
:toctree: generated
20+
21+
e
22+
inf
23+
nan
24+
pi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
e = 2.718281828459045
2+
"""
3+
IEEE 754 floating-point representation of Euler's constant.
4+
5+
``e = 2.71828182845904523536028747135266249775724709369995...``
6+
"""
7+
8+
inf = float('inf')
9+
"""
10+
IEEE 754 floating-point representation of (positive) infinity.
11+
"""
12+
13+
nan = float('nan')
14+
"""
15+
IEEE 754 floating-point representation of Not a Number (``NaN``).
16+
"""
17+
18+
pi = 3.141592653589793
19+
"""
20+
IEEE 754 floating-point representation of the mathematical constant ``π``.
21+
22+
``pi = 3.1415926535897932384626433...``
23+
"""
24+
25+
__all__ = ['e', 'inf', 'nan', 'pi']

0 commit comments

Comments
 (0)