MCPcopy Index your code
hub / github.com/numpy/numpy / asbytes

Function asbytes

numpy/_utils/_conversions.py:15–18  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

13
14
15def asbytes(s):
16 if isinstance(s, bytes):
17 return s
18 return str(s).encode('latin1')

Callers 10

fromregexFunction · 0.90
__init__Method · 0.90
writeMethod · 0.90
writelinesMethod · 0.90
test_arrayMethod · 0.90
test_header_footerMethod · 0.90
test_gft_from_gzipMethod · 0.90
countMethod · 0.90
test_check_on_fieldsMethod · 0.90

Calls 1

encodeMethod · 0.80

Tested by 9

__init__Method · 0.72
writeMethod · 0.72
writelinesMethod · 0.72
test_arrayMethod · 0.72
test_header_footerMethod · 0.72
test_gft_from_gzipMethod · 0.72
countMethod · 0.72
test_check_on_fieldsMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…