<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="matplotlib.tests.test_contour.test_corner_mask.test ... ok
/matplotlib/colorbar.py:539: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
  colors = np.asarray(colors)[igood]
/matplotlib/colorbar.py:539: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 3
  colors = np.asarray(colors)[igood]"><pre class="notranslate"><code class="notranslate">matplotlib.tests.test_contour.test_corner_mask.test ... ok
/matplotlib/colorbar.py:539: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
  colors = np.asarray(colors)[igood]
/matplotlib/colorbar.py:539: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 3
  colors = np.asarray(colors)[igood]
</code></pre></div>
<p dir="auto">Cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/efiring/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/efiring">@efiring</a>: Any thoughts as a colorbar expert?  I think the warning is due to a recent tightening in Numpy, but I'm not sure how to fix it.</p>
<p dir="auto">On Travis, the <code class="notranslate">test_given_colors_levels_and_extends</code> test is generating two <code class="notranslate">VisibleDeprecationWarning</code>s:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
  colors = np.asarray(colors)[igood]
.../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 3
  colors = np.asarray(colors)[igood]"><pre class="notranslate"><code class="notranslate">.../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
  colors = np.asarray(colors)[igood]
.../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 3
  colors = np.asarray(colors)[igood]
</code></pre></div>
<p dir="auto">The first occurs on the axes that is not filled and <code class="notranslate">extend='min'</code>; the second with unfilled and <code class="notranslate">extend='both'</code>. The passed colour list is 5 elements long and the levels list is 4 or 3. The warning can easily be fixed by trimming the colour list, but I'm not sure exactly where that should be.</p>
<p dir="auto">I guess I'm not entirely sure why one less level is passed for <code class="notranslate">extend='both'</code> when only unfilled. cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pelson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pelson">@pelson</a> who wrote the test</p>