How to save and show 2d numpy array as an RGB pseudo colored image?

Viewed 3782

I have a large size 2d numpy array (size = (2000, 2000)) with only five possible values 1.0, 2.0, 3.0, 4.0 and 5.0. I want to save and show this array as an image in RGB colored format, here each unique value of array should be represented by different color. Please help i am a beginner to python.

2 Answers
Related