fix issue when a variable is used as index.
fix issue when a variable is used as index.

Strictly, an error occurred when the code uses a non-integer variable as index in np.array.

permamodel/permamodel,permamodel/permamodel