I'm trying to map this dictionary
dict = {
5: np.array([1,1,1,1,1], dtype='int'),
4: np.array([1,1,1,1,0], dtype='int'),
3: np.array([1,1,1,0,0], dtype='int'),
2: np.array([1,1,0,0,0], dtype='int'),
1: np.array([1,0,0,0,0], dtype='int'),
0: np.array([0,0,0,0,0], dtype='int'),
-1: np.array([-1,0,0,0,0], dtype='int'),
-2: np.array([-1,-1,0,0,0], dtype='int'),
-3: np.array([-1,-1,-1,0,0], dtype='int'),
-4: np.array([-1,-1,-1,-1,0], dtype='int'),
-5: np.array([-1,-1,-1,-1,-1], dtype='int')}
in this numpy array
target
array([[ 2, 0, 2, 0, 0, 3, 0, 0, 1, 0, 0, -2, 4, -2, 0, 0,
-3, -3, -5, 1, 0, 0, 0, 2],
[ 4, 4, 3, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
1, -1, -2, -1, -2, -2, -3, -4],...])
The elements on the numpy array are int32. How can I map this?