MCPcopy Create free account
hub / github.com/numpy/numpy / pprint

Method pprint

numpy/core/records.py:291–298  ·  view source on GitHub ↗

Pretty-print all fields.

(self)

Source from the content-addressed store, hash-verified

289 return obj
290
291 def pprint(self):
292 """Pretty-print all fields."""
293 # pretty-print all fields
294 names = self.dtype.names
295 maxlen = max(len(name) for name in names)
296 fmt = '%% %ds: %%s' % maxlen
297 rows = [fmt % (name, getattr(self, name)) for name in names]
298 return "\n".join(rows)
299
300# The recarray is almost identical to a standard array (which supports
301# named fields already) The biggest difference is that it can use

Callers 1

print_assert_equalFunction · 0.80

Calls 2

maxFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected