Unfortunately it's not quite as easy as that, but there are simple alternatives.
you can either have your "dict" (you shouldn't use reserved names) as an array as well:
my_dict = np.array(['red', 'blue', 'green'])
label = np.array([0,0,0,1,1,1,2,2,2])
my_dict[[label]]
or you can use a comprehension:
[dict[item] for item in label]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…