Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Ck : list
a list of k-cells being referenced by arr
arr : np.array
a 0-1 array
Returns
----
: list
list of k-cells referenced by data in Ck
"""
output = list()
for vec in arr:
if len(Ck) != len(vec):
raise HyperNetXError('elements of arr must have the same length as Ck')
output.append([Ck[idx] for idx in range(len(vec)) if vec[idx] == 1])
return output