Skip to content

Tag: python-3.x

Python: cannot get a value from nested dict

I am trying to loop over array of dicts and create a new dict using a for loop: data for loop: And when I print src_roles_dict, I get an empty dict {} Is there something I am missing? Sorry, coming from golang background. Answer Output

Images constructed from dataset rotated

I am not very experienced with python plotting. I want to work with YaleB_32x32 dataset (https://github.com/flatironinstitute/online_psp/blob/master/datasets/YaleB_32x32.mat). This is my code : This is the output. As you can see that images are rotated. Could someone please help me with where am I going wrong…