one more BitCast test

Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2019-11-25 08:52:11 +03:00
parent 5b2ee72673
commit aa44fd6850
1 changed files with 10 additions and 0 deletions

View File

@ -1088,6 +1088,16 @@ public class CustomOpsTests extends BaseNd4jTest {
assertArrayEquals(new long[]{1,10, 2}, lsd.get(0).getShape());
}
@Test
public void testBitCastShape_3(){
val x = Nd4j.createFromArray(new int[]{1, 2, 3, 4, 5, 6, 7, 8}).reshape(1, 4, 2);
val e = Nd4j.createFromArray(new long[]{8589934593L, 17179869187L, 25769803781L, 34359738375L}).reshape(1, 4);
val z = Nd4j.exec(new BitCast(x, DataType.LONG.toInt()))[0];
assertEquals(e, z);
}
@Test
public void testMatch_1() {
INDArray x = Nd4j.ones(DataType.FLOAT, 3,3);