SkymindIO/nd4j — pull request #9 by guillempalou (2014-12-17 16:10:31+00:00)
Title: Fixed padWithZeros on arrayCopy function

Java is throwing an exception when convoling two arrays:

java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at org.nd4j.linalg.util.ComplexNDArrayUtil.padWithZeros(ComplexNDArrayUtil.java:235)
at org.nd4j.linalg.fft.VectorFFT.apply(VectorFFT.java:44)
at org.nd4j.linalg.fft.FFT.fft(FFT.java:105)
at org.nd4j.linalg.fft.FFT.rawfftn(FFT.java:366)
at org.nd4j.linalg.convolution.Convolution.convn(Convolution.java:72)
at org.nd4j.linalg.convolution.Convolution.convn(Convolution.java:148)
....

This error is due to the fact that INDArray.data() is not an array but a DataBuffer. Calling asDouble() fixes the problem.