This is my code i think needed a function different from this output.RowData.append().
Because it is doing the substitution of an array instead of adding another array in another row.
# Code for 'Script'
# We will use NumPy to read the csv file.
# Refer to NumPy documentation for genfromtxt() for details on
# customizing the CSV file parsing.
import numpy as np
# assuming data.csv is a CSV file with the 1st row being the names names for
# the columns
def m(v):
ma=[v[0],v[4],v[8],v[12],v[1],v[5],v[9],v[13],v[2],v[6],v[10],v[14],v[3],v[7],v[11],v[15]]
return ma
data = np.genfromtxt("C:\\Users\\joaoc\\OneDrive - Instituto Superior de Engenharia de Lisboa\\ISEL\\Mestrado\\Tese\\0-ProjetosPy\\Pro-Paraview\\Example_DAP\\selipsoids3.str", dtype=None, skip_header=1,
names=m(['M11','M12','M13','M14',
'M21','M22','M23','M24',
'M31','M32','M33','M34',
'M41','M42','M43','M44']))
cc = 1 # inicial row
ncx =3 # number of rows that it should jump to select the next one
ii = 0
ntrow=2400 #Numeber of rows from original file
for i in range(0,ntrow):
if i == ii*ncx + cc:
for name in data.dtype.names:
array = data[name]
output.RowData.append(array[ii], name)
ii=ii+1