How can I code a function that shows how many consecutive positive values there are starting from the end to the start of the arrays A, B, C. So array B has 2 positive consecutive values starting from the end 3,5 hence why resulting in the output of 2.
import numpy as np
A = np.array([2,5,44,-12,3,-5])
B = np.array([2,5,44,-12,3,5])
C = np.array([2,5,44,12,3,5])
Expected output:
0
2
6