@@ -52,9 +52,9 @@ with the new scheme to use the ``np`` prefix consistently:
5252The NEP does not propose to change how these scalars print – only
5353their representation (``__repr__ ``) will be changed.
5454Further, array representation will not be affected since it already
55- includes the ``dtype= `` when necessary.
55+ includes the ``dtype= `` when necessary.
5656
57- The main motivation behind the change is that the Python numerical types
57+ The main motivation behind the change is that the Python numerical types
5858behave differently from the NumPy scalars.
5959For example numbers with lower precision (e.g. ``uint8 `` or ``float16 ``)
6060should be used with care and users should be aware when they are working
@@ -136,7 +136,7 @@ This NEP proposes to change the represenatation for NumPy scalars to:
136136 ``np.longdouble('3.0') ``. This ensures that it can always roundtrip correctly
137137 and matches ``decimal.Decimal ``.
138138 Further, for these two the size based name such as ``float128 `` will not
139- be adopted, as it is platform dependend and imprecise.
139+ be adopted, as it is platform dependend and imprecise.
140140* ``np.str_("string") `` and ``np.bytes_(b"byte_string") `` for string dtypes.
141141
142142Where booleans are printed as their singletons since this is more concise.
@@ -164,6 +164,24 @@ to always print as ``longdouble`` and never ``float128`` or ``float96``.
164164It does not include deprecating the ``np.float128 `` alias.
165165However, such a deprecation may occur independently of the NEP.
166166
167+ Integer scalar type name and instance represenatation
168+ -----------------------------------------------------
169+
170+ One detail is that due to NumPy scalar types being based on the C types,
171+ NumPy sometimes distinguishes them, for example on most 64 bit systems
172+ (not windows)::
173+
174+ >>> np.longlong
175+ numpy.longlong
176+ >>> np.longlong(3)
177+ np.int64(3)
178+
179+ The proposal will lead to the ``longlong `` name for the type while
180+ using the ``int64 `` form for the scalar.
181+ This choice is made since ``int64 `` is generally the more useful
182+ information for users, but the type name itself must be precise.
183+
184+
167185Related Work
168186============
169187
0 commit comments