class_docstr: Test utilities used with colormaps.
class_docstr_tok: ["Test","utilities","used","with","colormaps","."]
docstr: Test that unknown array shape causes an error.
code: def test_cmap_from_file_bad_shape(self):
      """Test that unknown array shape causes an error."""
      from satpy.enhancements import create_colormap
  
      # create the colormap file on disk
      with closed_named_temp_file(suffix=".npy") as cmap_filename:
          np.save(
              cmap_filename,
              np.array(
                  [
                      [0],
                      [64],
                      [128],
                      [255],
                  ]
              ),
          )
  
          with pytest.raises(
              ValueError,
              match="Unexpected colormap shape for mode 'None'",
          ):
              create_colormap({"filename": cmap_filename})
  
imports: import contextlib
  import os
  from tempfile import NamedTemporaryFile
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.enhancements import create_colormap, on_dask_array, on_separate_bands, using_map_blocks
label_desc: Use image node_id 4 for calling the TestColormapLoading obj's underlying member method code with example usage: obj.test_cmap_from_file_bad_shape() without return types