Skip to content

Commit 8e054af

Browse files
committed
add zip<T1, T2, T3>()
1 parent 3425aa4 commit 8e054af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/TensorFlowNET.Core/Binding.Util.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ public static float time()
165165
yield return (t1[i], t2[i]);
166166
}
167167

168+
public static IEnumerable<(T1, T2, T3)> zip<T1, T2, T3>(IList<T1> t1, IList<T2> t2, IList<T3> t3)
169+
{
170+
for (int i = 0; i < t1.Count; i++)
171+
yield return (t1[i], t2[i], t3[i]);
172+
}
173+
168174
public static IEnumerable<(T1, T2)> zip<T1, T2>(NDArray t1, NDArray t2)
169175
where T1: unmanaged
170176
where T2: unmanaged
@@ -203,6 +209,7 @@ public static float time()
203209
yield return (i, values[i]);
204210
}
205211

212+
[DebuggerStepThrough]
206213
public static Dictionary<string, object> ConvertToDict(object dyn)
207214
{
208215
var dictionary = new Dictionary<string, object>();

0 commit comments

Comments
 (0)