Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # n = 100
- # p is some prime number
- # coefs is a 2D array of dimension 2*n
- # 'some_array' is a 1D numpy array of a different dimension than 'coefs'
- result = np.zeros(n)
- for i in range(n):
- result[i] = np.min(coefs[0][i] * some_array + coefs[1][i]) % p)
Add Comment
Please, Sign In to add comment