Home
last modified time | relevance | path

Searched refs:py_value (Results 1 – 5 of 5) sorted by relevance

/external/python/apitools/apitools/base/py/
Dextra_types.py121 def _PythonValueToJsonValue(py_value): argument
123 if py_value is None:
125 if isinstance(py_value, bool):
126 return JsonValue(boolean_value=py_value)
127 if isinstance(py_value, six.string_types):
128 return JsonValue(string_value=py_value)
129 if isinstance(py_value, numbers.Number):
130 if isinstance(py_value, six.integer_types):
131 if _MININT64 < py_value < _MAXINT64:
132 return JsonValue(integer_value=py_value)
[all …]
Dextra_types_test.py41 def assertTranslations(self, py_value, json_proto): argument
43 py_value, extra_types._JsonProtoToPythonValue(json_proto))
45 json_proto, extra_types._PythonValueToJsonProto(py_value))
/external/tensorflow/tensorflow/python/eager/
Dpywrap_tfe_src.cc230 bool fn_name(const string& key, PyObject* py_value, TF_Status* status, \
232 if (check_fn(py_value)) { \
233 *value = static_cast<type>(parse_fn(py_value)); \
239 py_value->ob_type->tp_name) \
255 bool ParseInt64Value(const string& key, PyObject* py_value, TF_Status* status, in PARSE_VALUE()
257 if (PyInt_Check(py_value)) { in PARSE_VALUE()
258 *value = static_cast<int64_t>(PyInt_AsLong(py_value)); in PARSE_VALUE()
260 } else if (PyLong_Check(py_value)) { in PARSE_VALUE()
261 *value = static_cast<int64_t>(PyLong_AsLong(py_value)); in PARSE_VALUE()
267 ", got ", py_value->ob_type->tp_name) in PARSE_VALUE()
[all …]
/external/python/pybind11/include/pybind11/
Dcast.h1023 py_type py_value;
1038 py_value = (py_type) PyFloat_AsDouble(src.ptr());
1062 py_value = as_unsigned<py_type>(src_or_index.ptr());
1064 py_value = sizeof(T) <= sizeof(long)
1071 bool py_err = py_value == (py_type) -1 && PyErr_Occurred();
1075 …td::is_integral<T>::value && sizeof(py_type) != sizeof(T) && py_value != (py_type) (T) py_value)) {
1087 value = (T) py_value;
/external/protobuf/python/google/protobuf/pyext/
Dmessage.cc1801 ScopedPyObjectPtr py_value(PyFloat_FromDouble(value)); in PrintDouble() local
1802 if (!py_value.get()) { in PrintDouble()
1806 ScopedPyObjectPtr py_str(PyObject_Str(py_value.get())); in PrintDouble()