lets say i have 3 arrays A,B and C and I have to make a dictionary such that it has enteries of A as keys and values as numpy arrays based on certain conditions
the code that is used in current code base is
d={label:np.where(np.and(b==label,c==1)[0] for label in a}
now this code is very slow for my case and i am looking for ways to optimize this .Any help will be appreciated
Utkarsh Sharma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.