I am converting a Python dictionary to NumPy array.
import numpy as np
myDict = {
1: "AAA",
2: "BBB",
3: "CCC",
4: "AAA",
5: "BBB"
}
myNumPyArray = np.asarray(myDict, dtype=dict, order="C")
print(myNumPyArray)
Output
{1: 'AAA', 2: 'BBB', 3: 'CCC', 4: 'AAA', 5: 'BBB'}
Why is it showing the dictionary in the output?