Thanks a lot for the responses.

I wanted it to be generic.

> . I don't know if the int type is essential to you algorithm, I ignorantly 
> assumed it is not (sorry if I might be wrong here).

I can have strings as well there. In case of string, i will have a diff of 2 if 
strings are not same otherwise it will be 0. Your approach makes sense for me. 
Especially if I will use the linear algebra libraries. In Python, I used numpy 
for these.

I used the CSVtools as this gives you easy access to read the data from files.

> It could be possible to get the column names from the csv itself. You can 
> read files at compile time, and build your object type according to the first 
> line.

I tried this as well but ended up messing up things with my limited knowledge 
of nim. In fact the csvtools gives you that option as well where you can get a 
seq[csvrows] and from there I guess you can create the type object.

I guess my issue is that I am thinking in python and then tries to implement in 
nim. I will need to develop my thinking in nim.

Thanks

Reply via email to