We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8350969 commit b6755ccCopy full SHA for b6755cc
test/TensorFlowNET.UnitTest/Basics/VariableTest.cs
@@ -83,6 +83,26 @@ public void SliceAssign()
83
Assert.AreEqual(nd[2], x[2].numpy());
84
}
85
86
+ [TestMethod, Ignore]
87
+ public void TypeMismatchedSliceAssign()
88
+ {
89
+ NDArray intNd = new int[]
90
91
+ 1, -2, 3
92
+ };
93
+ NDArray doubleNd = new double[]
94
95
+ -5, 6, -7
96
97
+ var x = tf.Variable(doubleNd);
98
+
99
+ var slice = x[":"];
100
+ Assert.ThrowsException<System.Exception>(
101
+ // this statement exit without throwing any exception but the "test execution summary" seems not able to detect that.
102
+ () => slice.assign(intNd)
103
+ );
104
+ }
105
106
[TestMethod]
107
public void Accumulation()
108
{
0 commit comments