Type nest
Namespace tensorflow.python.data.util.nest
Methods
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure
- assert_same_structure_dyn
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure
- assert_shallow_structure_dyn
- flatten_up_to
- flatten_up_to
- flatten_up_to
- flatten_up_to
- flatten_up_to
- flatten_up_to
- flatten_up_to
- flatten_up_to_dyn
- map_structure
- map_structure
- map_structure
- map_structure
- map_structure_dyn
- map_structure_dyn
- map_structure_up_to
- map_structure_up_to
- map_structure_up_to
- map_structure_up_to
- map_structure_up_to
- map_structure_up_to
- map_structure_up_to_dyn
- pack_sequence_as
- pack_sequence_as
- pack_sequence_as
- pack_sequence_as
- pack_sequence_as
- pack_sequence_as
- pack_sequence_as
Properties
Public static methods
void assert_same_structure(PythonClassContainer nest1, PythonClassContainer nest2, bool check_types)
void assert_same_structure(PythonClassContainer nest1, PythonClassContainer nest2, string check_types)
void assert_same_structure(PythonClassContainer nest1, object nest2, bool check_types)
void assert_same_structure(PythonClassContainer nest1, object nest2, string check_types)
void assert_same_structure(object nest1, PythonClassContainer nest2, bool check_types)
void assert_same_structure(object nest1, PythonClassContainer nest2, string check_types)
void assert_same_structure(object nest1, object nest2, bool check_types)
void assert_same_structure(object nest1, object nest2, string check_types)
object assert_same_structure_dyn(object nest1, object nest2, ImplicitContainer<T> check_types)
void assert_shallow_structure(string shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(object shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(PythonClassContainer shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(int shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(DType shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(IEnumerable<object> shallow_tree, object input_tree, bool check_types)
void assert_shallow_structure(IDictionary<object, object> shallow_tree, object input_tree, bool check_types)
object assert_shallow_structure_dyn(object shallow_tree, object input_tree, ImplicitContainer<T> check_types)
IList<object> flatten_up_to(IDictionary<object, object> shallow_tree, object input_tree)
IList<object> flatten_up_to(string shallow_tree, object input_tree)
IList<object> flatten_up_to(object shallow_tree, object input_tree)
IList<object> flatten_up_to(PythonClassContainer shallow_tree, object input_tree)
IList<object> flatten_up_to(int shallow_tree, object input_tree)
IList<object> flatten_up_to(DType shallow_tree, object input_tree)
IList<object> flatten_up_to(IEnumerable<object> shallow_tree, object input_tree)
object flatten_up_to_dyn(object shallow_tree, object input_tree)
string map_structure(PythonFunctionContainer func, IDictionary<string, object> check_types_dict, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
PythonFunctionContainer
func - A callable that accepts as many arguments as there are structures.
-
IDictionary<string, object>
check_types_dict -
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
string
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.
string map_structure(string func, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
string
func - A callable that accepts as many arguments as there are structures.
-
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
string
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.
string map_structure(PythonFunctionContainer func, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
PythonFunctionContainer
func - A callable that accepts as many arguments as there are structures.
-
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
string
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.
string map_structure(string func, IDictionary<string, object> check_types_dict, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
string
func - A callable that accepts as many arguments as there are structures.
-
IDictionary<string, object>
check_types_dict -
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
string
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.
object map_structure_dyn(object func, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
object
func - A callable that accepts as many arguments as there are structures.
-
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
object
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.
object map_structure_dyn(object func, IDictionary<string, object> check_types_dict, Object[] structure)
Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1],...)` where x[i] is an entry in
`structure[i]`. All structures in `structure` must have the same arity,
and the return value will contain results with the same structure layout.
Parameters
-
object
func - A callable that accepts as many arguments as there are structures.
-
IDictionary<string, object>
check_types_dict -
Object[]
structure - scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars.
Returns
-
object
- A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1],...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used.