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

Method tostring

numpy/ma/core.py:6153–6166  ·  view source on GitHub ↗

r""" A compatibility alias for `tobytes`, with exactly the same behavior. Despite its name, it returns `bytes` not `str`\ s. .. deprecated:: 1.19.0

(self, fill_value=None, order='C')

Source from the content-addressed store, hash-verified

6151 return result.tolist()
6152
6153 def tostring(self, fill_value=None, order='C'):
6154 r"""
6155 A compatibility alias for `tobytes`, with exactly the same behavior.
6156
6157 Despite its name, it returns `bytes` not `str`\ s.
6158
6159 .. deprecated:: 1.19.0
6160 """
6161 # 2020-03-30, Numpy 1.19.0
6162 warnings.warn(
6163 "tostring() is deprecated. Use tobytes() instead.",
6164 DeprecationWarning, stacklevel=2)
6165
6166 return self.tobytes(fill_value, order=order)
6167
6168 def tobytes(self, fill_value=None, order='C'):
6169 """

Callers

nothing calls this directly

Calls 2

tobytesMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected