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!
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With