Transpose array in LibreCal?

Is there anything like the following transpose function in Excel object? Thanks for any pointer!

  ExcelSheet.Range(...).Resize(1, ChannelCount).Value = oExcel.Worksheetfunction.Transpose(Chn)

So that I can transpose the array test first before using it in setdataarray in the following line?

 LibreSheet.getCellRangeByPosition(2, 3, 6, 7).setdataarray (test())

There is an annoying inconsistency.
Concerning 2D-arrays LibreOffice Basic generally works with “traditionally dimensioned” arrays as known from mathematics using an ordered pair of indices. like in M(i, j), and UDFs expect an array-result in this representation.
The API services generally work with sequences of sequences and address elements like in S(i)(j), and the TRANSPOSE() function called via a FunctionAccess object on the one hand accepts passed arrays in both representations, but returns on the other hand the result always as nested sequences.
Thus you can use the Calc function TRANSPOSE() in Basic for your task, and write the result to the DataArray by a Sub, but you can’t return the same result with an UDF to the sheet as a formula result.
Read about and the method .CallFunction of its interface XFunctionAccess .

Thanks for the info!