Skip to content

Commit 77b66c1

Browse files
authored
Add newaxis constant for use in array indexing (#414)
* Add `newaxis` constant * Update ToC
1 parent 6c49f50 commit 77b66c1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

spec/API_specification/constants.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Objects in API
2222
e
2323
inf
2424
nan
25+
newaxis
2526
pi

spec/API_specification/signatures/constants.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
IEEE 754 floating-point representation of Not a Number (``NaN``).
1616
"""
1717

18+
newaxis = None
19+
"""
20+
An alias for ``None`` which is useful for indexing arrays.
21+
"""
22+
1823
pi = 3.141592653589793
1924
"""
2025
IEEE 754 floating-point representation of the mathematical constant ``π``.
2126
2227
``pi = 3.1415926535897932384626433...``
2328
"""
2429

25-
__all__ = ['e', 'inf', 'nan', 'pi']
30+
__all__ = ['e', 'inf', 'nan', 'newaxis', 'pi']

0 commit comments

Comments
 (0)