@@ -146,15 +146,14 @@ def set_printoptions(precision=None, threshold=None, edgeitems=None,
146
146
- 'longcomplexfloat' : composed of two 128-bit floats
147
147
- 'numpystr' : types `numpy.string_` and `numpy.unicode_`
148
148
- 'object' : `np.object_` arrays
149
- - 'str' : all other strings
150
149
151
150
Other keys that can be used to set a group of types at once are:
152
151
153
152
- 'all' : sets all types
154
153
- 'int_kind' : sets 'int'
155
154
- 'float_kind' : sets 'float' and 'longfloat'
156
155
- 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
157
- - 'str_kind' : sets 'str' and ' numpystr'
156
+ - 'str_kind' : sets 'numpystr'
158
157
floatmode : str, optional
159
158
Controls the interpretation of the `precision` option for
160
159
floating-point types. Can take the following values
@@ -375,8 +374,7 @@ def _get_formatdict(data, *, precision, floatmode, suppress, sign, legacy,
375
374
'timedelta' : lambda : TimedeltaFormat (data ),
376
375
'object' : lambda : _object_format ,
377
376
'void' : lambda : str_format ,
378
- 'numpystr' : lambda : repr_format ,
379
- 'str' : lambda : str }
377
+ 'numpystr' : lambda : repr_format }
380
378
381
379
# we need to wrap values in `formatter` in a lambda, so that the interface
382
380
# is the same as the above values.
@@ -398,8 +396,7 @@ def indirect(x):
398
396
for key in ['complexfloat' , 'longcomplexfloat' ]:
399
397
formatdict [key ] = indirect (formatter ['complex_kind' ])
400
398
if 'str_kind' in fkeys :
401
- for key in ['numpystr' , 'str' ]:
402
- formatdict [key ] = indirect (formatter ['str_kind' ])
399
+ formatdict ['numpystr' ] = indirect (formatter ['str_kind' ])
403
400
for key in formatdict .keys ():
404
401
if key in fkeys :
405
402
formatdict [key ] = indirect (formatter [key ])
@@ -572,15 +569,14 @@ def array2string(a, max_line_width=None, precision=None,
572
569
- 'longcomplexfloat' : composed of two 128-bit floats
573
570
- 'void' : type `numpy.void`
574
571
- 'numpystr' : types `numpy.string_` and `numpy.unicode_`
575
- - 'str' : all other strings
576
572
577
573
Other keys that can be used to set a group of types at once are:
578
574
579
575
- 'all' : sets all types
580
576
- 'int_kind' : sets 'int'
581
577
- 'float_kind' : sets 'float' and 'longfloat'
582
578
- 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
583
- - 'str_kind' : sets 'str' and ' numpystr'
579
+ - 'str_kind' : sets 'numpystr'
584
580
threshold : int, optional
585
581
Total number of array elements which trigger summarization
586
582
rather than full repr.
0 commit comments