I'm looking for a command to pick the last element of my matrix that is nonzero. Not the index of the value, but the actual value. It's a (1001,50001) matrix where the last value of each column isn't the same.
It is not a dataframe, so preferably a numpy command.