Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
15
def
asbytes(s):
16
if
isinstance(s, bytes):
17
return
s
18
return
str(s).encode(
'latin1'
)
Callers
10
test_junk_in_string_fields_of_recarray
Method · 0.90
fromregex
Function · 0.90
__init__
Method · 0.90
write
Method · 0.90
writelines
Method · 0.90
test_array
Method · 0.90
test_header_footer
Method · 0.90
test_gft_from_gzip
Method · 0.90
count
Method · 0.90
test_check_on_fields
Method · 0.90
Calls
1
encode
Method · 0.80
Tested by
9
test_junk_in_string_fields_of_recarray
Method · 0.72
__init__
Method · 0.72
write
Method · 0.72
writelines
Method · 0.72
test_array
Method · 0.72
test_header_footer
Method · 0.72
test_gft_from_gzip
Method · 0.72
count
Method · 0.72
test_check_on_fields
Method · 0.72
Used in the wild
real call sites across dependent graphs
searching dependent graphs…