8000 DOC: Improve description of array scalar in glossary (#18965) · numpy/numpy@fb4ea91 · GitHub
[go: up one dir, main page]

Skip to content

Commit fb4ea91

Browse files
DOC: Improve description of array scalar in glossary (#18965)
Distinction of array scalars and 0-dimension arrays. See issue #17744. Co-authored-by: Jasmin Classen <39028086+jasmincl@users.noreply.github.com>
1 parent d18083b commit fb4ea91

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/source/glossary.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ Glossary
166166

167167

168168
array scalar
169-
For uniformity in handling operands, NumPy treats
170-
a :doc:`scalar <reference/arrays.scalars>` as an array of zero
171-
dimension.
169+
An :doc:`array scalar <reference/arrays.scalars>` is an instance of the types/classes float32, float64,
170+
etc.. For uniformity in handling operands, NumPy treats a scalar as
171+
an array of zero dimension. In contrast, a 0-dimensional array is an :doc:`ndarray <reference/arrays.ndarray>` instance
172+
containing precisely one value.
172173

173174

174175
axis

0 commit comments

Comments
 (0)
0