I have a tuple of arrays and need to find the length of an array by using the index of the tuple. This tuple is generated from a sparse matrix alternative to numpy where i'm using scipy.sparse.csr_matrix and numpy.unravel_index based on this post
ie:
>>>T = [(array([0,1,2,3,4,5]),), (array([0,1,2,3,4,5,6,7,8,9]),)]
>>>print(T[1])
(array([0,1,2,3,4,5,6,7,8,9]),)
I need to find the length of each array within the tuple for use later. using len() does not work
>>>len(T[1])
1
I am using this within a for loop that iterates through each array using those arrays as an index for other data.
I have searched and searched for how to solve this but found nothing. Please help!