Is it possible to directly lookup the length of an axis in a biom.Table object, or do you need to do something like the following, where t is a Table object:
if axis == 'sample':
length = t.shape[0]
elif axis == 'observation':
length = t.shape[1]
else:
raise UnknownAxisError(axis)
It seems like a better way to do this would be with a method like t.length(axis). Does functionality like that exist?
The best method right now would be:
__len__currently isn't overloaded because it isn't clear what axis should be returned. It may make sense to have alengthmethod though, and if you think it would be clearer to have, the best next step would be to create an issue on the github project.