MCPcopy
hub / github.com/numpy/numpy / __repr__

Method __repr__

numpy/ma/mrecords.py:338–349  ·  view source on GitHub ↗

Calculates the repr representation.

(self)

Source from the content-addressed store, hash-verified

336 return f"({', '.join(mstr)})"
337
338 def __repr__(self):
339 """
340 Calculates the repr representation.
341
342 """
343 _names = self.dtype.names
344 fmt = f"%{max(len(n) for n in _names) + 4}s : %s"
345 reprstr = [fmt % (f, getattr(self, f)) for f in self.dtype.names]
346 reprstr.insert(0, 'masked_records(')
347 reprstr.extend([fmt % (' fill_value', self.fill_value),
348 ' )'])
349 return str("\n".join(reprstr))
350
351 def view(self, dtype=None, type=None):
352 """

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
maxFunction · 0.70

Tested by

no test coverage detected