ahunter1289 / pyiotools

tools for science, engineering, mathematics, data analysis, and more
0 stars 0 forks source link

Non-square matrices #18

Open ahunter1289 opened 1 year ago

ahunter1289 commented 1 year ago

The following will break down, because if the CSV first element only has 1 column, this will return return_cols=0 and thus return 0 data

Need to fix this in the below: data[0]

if len(kwargs)==0:
    return_cols=len(data[0])-1

elif ('return_cols' in kwargs.keys() and
    type(kwargs['return_cols'])==int and
    kwargs['return_cols']<=len(data[0])-1 and
    kwargs['return_cols']>0):
ahunter1289 commented 1 year ago
if len(kwargs)==0:
    return_cols=len(data[4])-1
elif ('return_cols' in kwargs.keys() and
    type(kwargs['return_cols'])==int and
    kwargs['return_cols']<=len(data[4])-1 and
    kwargs['return_cols']>0):