@Test
  public void testPutComplex() {
    INDArray fourTwoTwo = Nd4j.linspace(1, 16, 16).reshape(4, 2, 2);
    IComplexNDArray test = Nd4j.createComplex(4, 2, 2);

    for (int i = 0; i < test.vectorsAlongDimension(0); i++) {
      INDArray vector = fourTwoTwo.vectorAlongDimension(i, 0);
      IComplexNDArray complexVector = test.vectorAlongDimension(i, 0);
      for (int j = 0; j < complexVector.length(); j++) {
        complexVector.putReal(j, vector.getFloat(j));
      }
    }

    for (int i = 0; i < test.vectorsAlongDimension(0); i++) {
      INDArray vector = fourTwoTwo.vectorAlongDimension(i, 0);
      IComplexNDArray complexVector = test.vectorAlongDimension(i, 0);
      assertEquals(vector, complexVector.real());
    }
  }
 @Test
 public void testCreateComplexFromReal() {
   INDArray n = Nd4j.create(new double[] {1, 2, 3, 4, 5, 6, 7, 8}, new int[] {2, 4});
   IComplexNDArray nComplex = Nd4j.createComplex(n);
   for (int i = 0; i < n.vectorsAlongDimension(0); i++) {
     INDArray vec = n.vectorAlongDimension(i, 0);
     IComplexNDArray vecComplex = nComplex.vectorAlongDimension(i, 0);
     assertEquals(vec.length(), vecComplex.length());
     for (int j = 0; j < vec.length(); j++) {
       IComplexNumber currComplex = vecComplex.getComplex(j);
       double curr = vec.getFloat(j);
       assertEquals(curr, currComplex.realComponent().doubleValue(), 1e-1);
     }
     assertEquals(vec, vecComplex.getReal());
   }
 }