How to convert float[,,] to Color[] or to Vector4[]?

Hi, first of all I’d like to know what is a float[,] and how can I imagine it, then I’m trying a way to convert a array of floats (float[,]) to a array of color. Could someone help me?

float[,] is a 3 dimensional array of floats - think a cube made of square bricks with a float in each brick.

What shape does the Color array need to be though - because float[,] is enough to make a single dimensional array of Color or Vector4.

Do you need a square array of Color?

    if(yourFloatArray.Rank != 3 || yourFloatArray.GetLength(2) < 3)
    {
         throw new Exception("Bad input array");
    }

    Color[,] yourColorArray = new Color[yourFloatArray.GetLength(0), yourFloatArray.GetLength(1)];

    for(var x = 0; x < yourFloatArray.GetLength(0); x++)
    {
          for(var y = 0; y < yourFloatArray.GetLength(1); y++)
          {
                  var c = new Color(yourFloatArray[x,y,0], yourFloatArray[x,y,1], yourFloatArray[x,y,2], 1);
                  yourColorArray[x,y] = c;
          }
    }