public void Diff_Scalar_ThrowException() { // arrange const int DummyValue = 3; var input = NdArray <int> .Scalar(HostDevice.Instance, DummyValue); // action var diagMat = NdArrayOperator <int> .Diff(input); }
public void Diff() { // arrange var input = NdArray <int> .Arange(HostDevice.Instance, 0, 9, 1).Reshape(new[] { 3, 3 }); // action var result = NdArrayOperator <int> .Diff(input); // assert CollectionAssert.AreEqual(new[] { 3, 2 }, result.Shape); }