From f32314e85b9be648936ce5ed00c62881ecf69ab7 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Thu, 15 Jul 2021 21:01:54 -0500 Subject: [PATCH] test meshgrid_same_ndim --- test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs b/test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs index f0d6cbef..112e2d6c 100644 --- a/test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs +++ b/test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs @@ -80,5 +80,13 @@ namespace TensorFlowNET.UnitTest.NumPy Assert.IsTrue(Equal(new double[] { 0, 1 }, yv.ToArray())); AssetSequenceEqual(new long[] { 2, 1 }, yv.shape.dims); } + + [TestMethod] + public void meshgrid_same_ndim() + { + var (a, b) = np.meshgrid(np.arange(3), np.arange(3)); + AssetSequenceEqual(a.ToArray(), new int[] { 0, 1, 2, 0, 1, 2, 0, 1, 2 }); + AssetSequenceEqual(b.ToArray(), new int[] { 0, 0, 0, 1, 1, 1, 2, 2, 2 }); + } } }