10000 test meshgrid_same_ndim · SciSharp/TensorFlow.NET@f32314e · GitHub
[go: up one dir, main page]

Skip to content

Commit f32314e

Browse files
committed
test meshgrid_same_ndim
1 parent 1cf190f commit f32314e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,13 @@ public void meshgrid()
8080
Assert.IsTrue(Equal(new double[] { 0, 1 }, yv.ToArray<double>()));
8181
AssetSequenceEqual(new long[] { 2, 1 }, yv.shape.dims);
8282
}
83+
84+
[TestMethod]
85+
public void meshgrid_same_ndim()
86+
{
87+
var (a, b) = np.meshgrid(np.arange(3), np.arange(3));
88+
AssetSequenceEqual(a.ToArray<int>(), new int[] { 0, 1, 2, 0, 1, 2, 0, 1, 2 });
89+
AssetSequenceEqual(b.ToArray<int>(), new int[] { 0, 0, 0, 1, 1, 1, 2, 2, 2 });
90+
}
8391
}
8492
}

0 commit comments

Comments
 (0)
0