|
|
@@ -24,5 +24,19 @@ namespace TensorFlowNET.UnitTest.NumPy |
|
|
|
y = np.expand_dims(x, axis: 1); |
|
|
|
Assert.AreEqual(y.shape, (2, 1)); |
|
|
|
} |
|
|
|
|
|
|
|
[TestMethod] |
|
|
|
public void moveaxis() |
|
|
|
{ |
|
|
|
var x = np.zeros((3, 4, 5)); |
|
|
|
var y = np.moveaxis(x, 0, -1); |
|
|
|
Assert.AreEqual(y.shape, (4, 5, 3)); |
|
|
|
|
|
|
|
y = np.moveaxis(x, (0, 1), (-1, -2)); |
|
|
|
Assert.AreEqual(y.shape, (5, 4, 3)); |
|
|
|
|
|
|
|
y = np.moveaxis(x, (0, 1, 2), (-1, -2, -3)); |
|
|
|
Assert.AreEqual(y.shape, (5, 4, 3)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |