Browse Source

test meshgrid_same_ndim

tags/v0.60-tf.numpy
Oceania2018 4 years ago
parent
commit
f32314e85b
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs

+ 8
- 0
test/TensorFlowNET.UnitTest/Numpy/Array.Creation.Test.cs View File

@@ -80,5 +80,13 @@ namespace TensorFlowNET.UnitTest.NumPy
Assert.IsTrue(Equal(new double[] { 0, 1 }, yv.ToArray<double>()));
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<int>(), new int[] { 0, 1, 2, 0, 1, 2, 0, 1, 2 });
AssetSequenceEqual(b.ToArray<int>(), new int[] { 0, 0, 0, 1, 1, 1, 2, 2, 2 });
}
}
}

Loading…
Cancel
Save