summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-12-19 15:41:38 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2020-12-19 15:41:38 +0100
commit82e5747dd40cbbde9c728452f21fa4716492c81d (patch)
treedaf6f7f3e3b17fa7ced45ed02e08384f8b2be2ce /numpy/core/arrayprint.py
parent2717731451db52351f3dbf4814a1858a668744f0 (diff)
downloadnumpy-82e5747dd40cbbde9c728452f21fa4716492c81d.tar.gz
MAINT: Remove any mention of `formatter["str"]`
It's been non-functional for the past 8 years (xref https://github.com/numpy/numpy/pull/459)
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index 51bad18de..94ec8ed34 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -146,7 +146,6 @@ def set_printoptions(precision=None, threshold=None, edgeitems=None,
- 'longcomplexfloat' : composed of two 128-bit floats
- 'numpystr' : types `numpy.string_` and `numpy.unicode_`
- 'object' : `np.object_` arrays
- - 'str' : all other strings
Other keys that can be used to set a group of types at once are:
@@ -154,7 +153,7 @@ def set_printoptions(precision=None, threshold=None, edgeitems=None,
- 'int_kind' : sets 'int'
- 'float_kind' : sets 'float' and 'longfloat'
- 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
- - 'str_kind' : sets 'str' and 'numpystr'
+ - 'str_kind' : sets 'numpystr'
floatmode : str, optional
Controls the interpretation of the `precision` option for
floating-point types. Can take the following values
@@ -375,8 +374,7 @@ def _get_formatdict(data, *, precision, floatmode, suppress, sign, legacy,
'timedelta': lambda: TimedeltaFormat(data),
'object': lambda: _object_format,
'void': lambda: str_format,
- 'numpystr': lambda: repr_format,
- 'str': lambda: str}
+ 'numpystr': lambda: repr_format}
# we need to wrap values in `formatter` in a lambda, so that the interface
# is the same as the above values.
@@ -398,8 +396,7 @@ def _get_formatdict(data, *, precision, floatmode, suppress, sign, legacy,
for key in ['complexfloat', 'longcomplexfloat']:
formatdict[key] = indirect(formatter['complex_kind'])
if 'str_kind' in fkeys:
- for key in ['numpystr', 'str']:
- formatdict[key] = indirect(formatter['str_kind'])
+ formatdict['numpystr'] = indirect(formatter['str_kind'])
for key in formatdict.keys():
if key in fkeys:
formatdict[key] = indirect(formatter[key])
@@ -572,7 +569,6 @@ def array2string(a, max_line_width=None, precision=None,
- 'longcomplexfloat' : composed of two 128-bit floats
- 'void' : type `numpy.void`
- 'numpystr' : types `numpy.string_` and `numpy.unicode_`
- - 'str' : all other strings
Other keys that can be used to set a group of types at once are:
@@ -580,7 +576,7 @@ def array2string(a, max_line_width=None, precision=None,
- 'int_kind' : sets 'int'
- 'float_kind' : sets 'float' and 'longfloat'
- 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
- - 'str_kind' : sets 'str' and 'numpystr'
+ - 'str_kind' : sets 'numpystr'
threshold : int, optional
Total number of array elements which trigger summarization
rather than full repr.