Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tdishr/TdiSubscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ int Tdi1Subscript(opcode_t opcode, int narg, struct descriptor *list[],
}
if (STATUS_NOT_OK)
goto badsub;
/* Remove trailing scalar dimensions from signals too */
if (psig && highdim > highest)
highdim = highest;
/********************************************
We know the shape and type, so get the space.
Result is scalar if all indices are scalar.
Expand Down
8 changes: 7 additions & 1 deletion tditest/testing/test-tdishr.ans
Original file line number Diff line number Diff line change
Expand Up @@ -5549,11 +5549,17 @@ text(42,5)
(1:100)[42]
43
build_signal(1:10,*,["1","2","3","4","5","6","7","8","9","10"])["5"]
Build_Signal(5, *, "5 ")
Build_Signal(5, *)
build_signal(1:10,*,1:10)[-1:5]
Build_Signal([1,2,3,4,5], *, [1,2,3,4,5])
Build_signal(1:100,*,build_dim(*,.01:1:.01))[.2:.25]
Build_Signal([20,21,22,23,24,25], *, [.2,.21,.22,.23,.24,.25])
_sig2=build_signal([5:15,-5:5],*,build_dim(*,0:.01:.001),build_dim(*,[0.8,0.9]))
Build_Signal([5 : 15, -5 : 5], *, Build_Dim(*, 0 : .01 : .001), Build_Dim(*, [.8,.9]))
_sig1=_sig2[*,0.8]
Build_Signal([5,6,7,8,9,10,11,12,13,14,15], *, [0.,.001,.002,.003,.004,.005,.006,.007,.008,.009,.01])
_sig1[*:*:.01]
Build_Signal([5,15], *, [0.,.01])
MAP(1:10,[20,-1,5])
[10,1,6]
(_A=5:1:-1, MAP(_A,SORT(_A)))
Expand Down
3 changes: 3 additions & 0 deletions tditest/testing/test-tdishr.tdi
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,9 @@ text(42,5)
build_signal(1:10,*,["1","2","3","4","5","6","7","8","9","10"])["5"]
build_signal(1:10,*,1:10)[-1:5]
Build_signal(1:100,*,build_dim(*,.01:1:.01))[.2:.25]
_sig2=build_signal([5:15,-5:5],*,build_dim(*,0:.01:.001),build_dim(*,[0.8,0.9]))
_sig1=_sig2[*,0.8]
_sig1[*:*:.01]
MAP(1:10,[20,-1,5])
(_A=5:1:-1, MAP(_A,SORT(_A)))
#
Expand Down