MCPcopy Index your code
hub / github.com/pytorch/pytorch / get

Method get

caffe2/python/schema.py:534–541  ·  view source on GitHub ↗

similar to python's dictionary get method, return field of item if found (i.e. self.item is valid) or otherwise return default_value it's a syntax suger of python's builtin getattr method

(self, item, default_value)

Source from the content-addressed store, hash-verified

532 return field
533
534 def get(self, item, default_value):
535 """
536 similar to python's dictionary get method, return field of item if found
537 (i.e. self.item is valid) or otherwise return default_value
538
539 it's a syntax suger of python's builtin getattr method
540 """
541 return getattr(self, item, default_value)
542
543 def __getattr__(self, item):
544 if item.startswith('__'):

Callers 15

runMethod · 0.45
_getargFunction · 0.45
conf.pyFile · 0.45
getDataAsByteArrayMethod · 0.45
getDataAsIntArrayMethod · 0.45
getDataAsFloatArrayMethod · 0.45
getDataAsLongArrayMethod · 0.45
getDataAsDoubleArrayMethod · 0.45
upload_fileFunction · 0.45

Calls

no outgoing calls

Tested by 15

run_test_locallyMethod · 0.36
testIfMethod · 0.36
testWhileMethod · 0.36
floatsFunction · 0.36
runOpBenchmarkFunction · 0.36
runOpOnInputFunction · 0.36
assertReferenceChecksMethod · 0.36
assertRunOpRaisesMethod · 0.36