PCA fails when allocating 3d array.