<p dir="auto">Python 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32,</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import seaborn as sns<br>
import numpy as np</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">sns.<strong>version</strong><br>
'0.9.0'<br>
np.<strong>version</strong><br>
'1.18.1'</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">sns.palplot(sns.diverging_palette(150, 275, s=80, l=55, n=9))</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\numpy\core\function_base.py", line 117, in linspace<br>
num = operator.index(num)<br>
TypeError: 'float' object cannot be interpreted as an integer</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 744, in diverging_palette<br>
neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 641, in light_palette<br>
return blend_palette(colors, n_colors, as_cmap)<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 777, in blend_palette<br>
pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))<br>
File "&lt;<strong>array_function</strong> internals&gt;", line 6, in linspace<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\numpy\core\function_base.py", line 121, in linspace.format(type(num)))<br>
TypeError: object of type &lt;class 'float'&gt; cannot be safely interpreted as an integer.</p>
<p dir="auto">python: 3.6.9<br>
seaborn version: 0.9.0<br>
matplotlib version: 3.1.2<br>
matplotlib backend: module://ipykernel.pylab.backend_inline</p>
<p dir="auto">Trying to get a diverging palette and running code from documentation:<br>
<a href="https://seaborn.pydata.org/generated/seaborn.diverging_palette.html" rel="nofollow">https://seaborn.pydata.org/generated/seaborn.diverging_palette.html</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns; sns.set()
sns.palplot(sns.diverging_palette(240, 10, n=9))"><pre class="notranslate"><code class="notranslate">import seaborn as sns; sns.set()
sns.palplot(sns.diverging_palette(240, 10, n=9))
</code></pre></div>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
    116     try:
--&gt; 117         num = operator.index(num)
    118     except TypeError:

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

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
&lt;ipython-input-10-3b31105fd99b&gt; in &lt;module&gt;
      1 import seaborn as sns; sns.set()
----&gt; 2 sns.palplot(sns.diverging_palette(240, 10, n=9))

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in diverging_palette(h_neg, h_pos, s, l, sep, n, center, as_cmap)
    742     &quot;&quot;&quot;
    743     palfunc = dark_palette if center == &quot;dark&quot; else light_palette
--&gt; 744     neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input=&quot;husl&quot;)
    745     pos = palfunc((h_pos, s, l), 128 - (sep / 2), input=&quot;husl&quot;)
    746     midpoint = dict(light=[(.95, .95, .95, 1.)],

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in light_palette(color, n_colors, reverse, as_cmap, input)
    639     light = set_hls_values(color, l=.95)  # noqa
    640     colors = [color, light] if reverse else [light, color]
--&gt; 641     return blend_palette(colors, n_colors, as_cmap)
    642 
    643 

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in blend_palette(colors, n_colors, as_cmap, input)
    775     pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)
    776     if not as_cmap:
--&gt; 777         pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))
    778     return pal
    779 

&lt;__array_function__ internals&gt; in linspace(*args, **kwargs)

~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
    119         raise TypeError(
    120             &quot;object of type {} cannot be safely interpreted as an integer.&quot;
--&gt; 121                 .format(type(num)))
    122 
    123     if num &lt; 0:

TypeError: object of type &lt;class 'float'&gt; cannot be safely interpreted as an integer."><pre class="notranslate"><code class="notranslate">
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
    116     try:
--&gt; 117         num = operator.index(num)
    118     except TypeError:

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

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
&lt;ipython-input-10-3b31105fd99b&gt; in &lt;module&gt;
      1 import seaborn as sns; sns.set()
----&gt; 2 sns.palplot(sns.diverging_palette(240, 10, n=9))

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in diverging_palette(h_neg, h_pos, s, l, sep, n, center, as_cmap)
    742     """
    743     palfunc = dark_palette if center == "dark" else light_palette
--&gt; 744     neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")
    745     pos = palfunc((h_pos, s, l), 128 - (sep / 2), input="husl")
    746     midpoint = dict(light=[(.95, .95, .95, 1.)],

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in light_palette(color, n_colors, reverse, as_cmap, input)
    639     light = set_hls_values(color, l=.95)  # noqa
    640     colors = [color, light] if reverse else [light, color]
--&gt; 641     return blend_palette(colors, n_colors, as_cmap)
    642 
    643 

~/.local/lib/python3.6/site-packages/seaborn/palettes.py in blend_palette(colors, n_colors, as_cmap, input)
    775     pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)
    776     if not as_cmap:
--&gt; 777         pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))
    778     return pal
    779 

&lt;__array_function__ internals&gt; in linspace(*args, **kwargs)

~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
    119         raise TypeError(
    120             "object of type {} cannot be safely interpreted as an integer."
--&gt; 121                 .format(type(num)))
    122 
    123     if num &lt; 0:

TypeError: object of type &lt;class 'float'&gt; cannot be safely interpreted as an integer.
</code></pre></div>
<p dir="auto">looks like its due to line 744 the 128 - (sep / 2) produces a float<br>
next line will also have issue</p>