Numpy array slicing got JS error message

If this template helps then use it. If not then just delete and start from scratch.

PsychoPy version 2022.2.4
Standard Standalone? (y)
What are you trying to achieve?:
slice columns from numpy array

What did you try to make it work?:
my python code in the code object

mou_cords_trans = rotmx, mou_cords[0,:-1].transpose())

What specifically went wrong when you tried that?:
Getting the following error message
/* Syntax Error: Fix Python code */

But the following code is fine (though not what I’d like to do, namely, rotate a multi-row, 2D vector):

mou_cords_trans = rotmx, mou_cords[0,1].transpose())

Ok, the following codes solve the problem:

index_col = [0,1]
mou_cords_trans =, mou_cords[0,index_col].transpose())

Looks like the Python → JS conversion does not like certain idiom of doing numpy.