2

I'm trying to create my own colormap object for a seaborn heatmap.

But when I type in:

import seaborn as sns
new_map = sns.diverging_palette(220, 10, as_cmap=True)

I get the following error:

TypeError: 'float' object cannot be interpreted as an integer

What am I doing wrong?

Thanks in advance!

user356
  • 303
  • 2
  • 10

1 Answers1

1

According to this issue, it is a bug which you can solve by downgrading numpy to a version prior to 1.18:

pip install numpy==1.17.4

or upgrade seaborn to a version newer than 0.9.1:

pip install seaborn==1.10.0
Zephyr
  • 11,891
  • 53
  • 45
  • 80