MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsMappingViewHelper

Function IsMappingViewHelper

tensorflow/python/util/util.cc:227–232  ·  view source on GitHub ↗

Returns 1 if `o` is considered a mapping view for the purposes of Flatten(). Returns 0 otherwise. Returns -1 if an error occurred.

Source from the content-addressed store, hash-verified

225// Returns 0 otherwise.
226// Returns -1 if an error occurred.
227int IsMappingViewHelper(PyObject* o) {
228 static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) {
229 return IsInstanceOfRegisteredType(to_check, "MappingView");
230 });
231 return check_cache->CachedLookup(o);
232}
233
234// Returns 1 if `o` is an instance of attrs-decorated class.
235// Returns 0 otherwise.

Callers 2

IsSequenceHelperFunction · 0.85
IsMappingViewFunction · 0.85

Calls 2

CachedLookupMethod · 0.80

Tested by

no test coverage detected