What is the function to be used in numpy to obtain the following result?
import numpy as np
store = np.array([0,0,1,2])
cost = np.array([1,11,12,13])
O/P
[[0,1],[0,11],[1,12],[2,13]]
What is the function to be used in numpy to obtain the following result?
import numpy as np
store = np.array([0,0,1,2])
cost = np.array([1,11,12,13])
O/P
[[0,1],[0,11],[1,12],[2,13]]
The function pack does this behaviour:
pack = zip(store, cost)
With this function you will get:
[(0, 1), (0, 11), (1, 12), (2, 13)]