I have this type of array float[1][1][54][54]. If it possible to cast this array to float[54][54]? Maybe it`s possible to remove two first empty dimensions?
1 Answer
You can't cast it, but you can just assign the inner array to a new variable:
float[][][][] arr1 = new float[1][1][54][54];
float[][] arr2 = arr1[0][0];
Note that although they're separate variables, they actually share a reference to the same inner array, so they can't be modified separately.