docs: def arr_to_vector(arr):
      """Reshape a multidimensional array to a vector.
      """
      dim = array_dim(arr)
      tmp_arr = []
      for n in range(len(dim) - 1):
          for inner in arr:
              for i in inner:
                  tmp_arr.append(i)
          arr = tmp_arr
          tmp_arr = []
      return arr