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

Method __str__

numpy/ma/mrecords.py:335–347  ·  view source on GitHub ↗

Calculates the string representation.

(self)

Source from the content-addressed store, hash-verified

333 self._mask[indx] = ma.getmaskarray(value)
334
335 def __str__(self):
336 """
337 Calculates the string representation.
338
339 """
340 if self.size > 1:
341 mstr = [f"({','.join([str(i) for i in s])})"
342 for s in zip(*[getattr(self, f) for f in self.dtype.names])]
343 return f"[{', '.join(mstr)}]"
344 else:
345 mstr = [f"{','.join([str(i) for i in s])}"
346 for s in zip([getattr(self, f) for f in self.dtype.names])]
347 return f"({', '.join(mstr)})"
348
349 def __repr__(self):
350 """

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected