title: How to flatten (reshape to 1D) an array of arbitrary dimension in Labview
body: <p>Let A be an array of arbitrary dimension (2 or 3 in my case).
  How can I flatten (reshape to 1D) this array without knowing in advance the number of dimensions ?</p>
  
  <p>If I knew the number of dimensions, I could easily obtain the total number of elements (by using a combination of "Array Size" function) and then reshape A to 1D using this number.
  Unfortunately, the "Array Size" function itself returns an array whose number of elements is equal to the number of dimensions, which brings us back to the initial problem.</p>
  
  <p>I have "solved" the problem by creating a function (VI) that returns the total number of elements of a 3D array (the most common type of arrays that I expect to handle), so that I can give this as an argument to the Reshape function. Problem: it won't accept a 2D array, even though the algorithm would work with such an array ! (it seems that in Labview, array controls are strict about the number of dimensions they accept, which isn't the case in Matlab for instance).</p>
  
  <p>A nice solution would be a simple way to multiply all the elements of the array given by "Array Size" to quickly get the total number of elements, without having to wrap this in a sub VI.
  Overall, isn't there a simple and efficient way to solve this problem ? It should be quite standard..</p>