Opened 4 years ago
Last modified 4 years ago
#6268 closed defect
Array[1,dim] get's changed to Array[dim,1] — at Initial Version
Reported by: | Andreas Heuermann | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | NeedsInput |
Component: | Frontend | Version: | 1.16.0 |
Keywords: | array, newFrontend | Cc: | Mahder Alemseged Gebremedhin |
Description
I have a model that calls a built-in function point-wise on a vector input with dimension [1,dim]
, but the output of that function is of dimension [dim,1]
.
setCommandLineOptions("-d=newInst,optdaedump"); loadString(" model mwe Real vectorA[1,4]; equation vectorA = tanh( {{10,20,30,40}} ); end mwe; "); getErrorString(); simulate(mwe); getErrorString();
When I dump the equation at the first point in the frontend with optdaedump I'll get
Equations (1, 4) ======================================== 1/1 (4): vectorA = {{tanh(10.0)}, {tanh(20.0)}, {tanh(30.0)}, {tanh(40.0)}} [dynamic |0|0|0|0|]
but I would expect to get the same dimension as the input was, so:
vectorA = {{tanh(10.0), tanh(20.0), tanh(30.0), tanh(40.0)}
This prevents me from solving related ticket #6266.
@mahge930, @perost Any idea where to look at for this?
By the way, if I use the old frontend it gets flattened out is completely wrong.
Note:
See TracTickets
for help on using tickets.