From bafe4e4691af6cdb5ae845f4c676591ea7cdc23a Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 6 Apr 2022 21:09:03 -0700 Subject: [PATCH 1/2] Add `newaxis` constant --- spec/API_specification/signatures/constants.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/API_specification/signatures/constants.py b/spec/API_specification/signatures/constants.py index 813b6d079..18c8ac761 100644 --- a/spec/API_specification/signatures/constants.py +++ b/spec/API_specification/signatures/constants.py @@ -15,6 +15,11 @@ IEEE 754 floating-point representation of Not a Number (``NaN``). """ +newaxis = None +""" +An alias for ``None`` which is useful for indexing arrays. +""" + pi = 3.141592653589793 """ IEEE 754 floating-point representation of the mathematical constant ``π``. @@ -22,4 +27,4 @@ ``pi = 3.1415926535897932384626433...`` """ -__all__ = ['e', 'inf', 'nan', 'pi'] +__all__ = ['e', 'inf', 'nan', 'newaxis', 'pi'] From 20b60b370a4b64a412b3a3e39089dcfa5f22242b Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Sun, 17 Apr 2022 22:59:31 -0700 Subject: [PATCH 2/2] Update ToC --- spec/API_specification/constants.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/API_specification/constants.rst b/spec/API_specification/constants.rst index aa278a360..4d71ed380 100644 --- a/spec/API_specification/constants.rst +++ b/spec/API_specification/constants.rst @@ -22,4 +22,5 @@ Objects in API e inf nan + newaxis pi