From a function I am receiving a 2 dimensional array, I want to use this array as input data to my neural network. For this to be working it has to be an element of a 3-dimensional array. When I try to do this I get an error. I'm probably doing something wrong syntax-wise but can't figure out what the solution is. Can anyone help me?
int[,] d = image.GetData();
int[,,] neuralInput = { { d } };
also tried:
int[,,] neuralInput = { d };
bool[] answers = new bool[1] { true };
which both result in this error:
Severity Code Description Project File Line Suppression State
Error CS0846 A nested array initializer is expected Sandbox C:\Users\Jordy\Documents\KBS-SE3_VR-
Rehabilitation-Data\Sandbox\Program.cs 47 Active
and:
int[,] d = image.GetData();
int[,,] neuralInput;
neuralInput[0] = d;
which results in:
Severity Code Description Project File Line Suppression State
Error CS0022 Wrong number of indices inside []; expected 3 Sandbox C:\Users\Jordy\Documents\KBS-
SE3_VR-Rehabilitation-Data\Sandbox\Program.cs 47 Active