Maybe a very vague question, but digging the links on numpy did not help me.
I need to do a similarity matrix calculation with following hierarchial clustering for binary array that look like this
name val1 val2 val3 val4 val5
comp1 0 0 1 0 1
comp2 1 0 0 0 0
comp3 0 0 1 0 0
comp4 1 1 0 0 0
comp5 0 0 1 0 0
I don't understand the concept of row names in numpy. I can read the file like this
test = np.genfromtxt('test.b', delimiter='\t', names = True, dtype = None)
print type(test[0])
numpy.void
print test[0]
('comp1',0, 0, 1, 0, 1)
But how to take into account the row names (this info is very important)? Is it possible?
I suppose that the void is not a correct way of storing a binary array for further similarity matrix calculation?