MCPcopy
hub / github.com/numpy/numpy / pprint

Method pprint

numpy/_core/records.py:261–267  ·  view source on GitHub ↗

Pretty-print all fields.

(self)

Source from the content-addressed store, hash-verified

259 return obj
260
261 def pprint(self):
262 """Pretty-print all fields."""
263 # pretty-print all fields
264 names = self.dtype.names
265 maxlen = max(len(name) for name in names)
266 rows = [f"{name:>{maxlen}}: {getattr(self, name)}" for name in names]
267 return "\n".join(rows)
268
269# The recarray is almost identical to a standard array (which supports
270# named fields already) The biggest difference is that it can use

Callers 2

check_built_versionFunction · 0.80
print_assert_equalFunction · 0.80

Calls 2

joinMethod · 0.80
maxFunction · 0.70

Tested by

no test coverage detected