2d arrays

Ajay abra9823 at mail.usyd.edu.au
Tue Nov 2 09:11:53 EST 2004


hi!

i am trying to do something as follows:
i have a set of id's. These are from 4-10.
I also have a set of users. Users have values for some of these id's
thus, userA could have userA(4)=7, userA(6)=4 and userB may only have
userB(7)=3

what i am trying to do is to make this into a 2d array

id's/users 4 5 6 7 8 9 10
userA      7   4
userB            3
userC                3  4

and so on. Has anyone done this before? if yes, do you mind sharing how.
the problem is user information is stored in a db and all id's are stored
in a table.
so first of all, i get the entire range of id's from a table.
i then need to go through all user tables and get their corresponding
values and do this in an efficient way.

btw, has anyone worked on a recommender system that uses collaborative
filtering with cosine similarity measure.

thanks

cheers





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Python-list mailing list