def test_slice_in_title_single_item_array(self) -> None:
        """Edge case for data of shape (1, N) or (N, 1)."""
        darray = self.darray.expand_dims({"d": np.array([10.009])})
        darray.plot.line(x="period")
        title = plt.gca().get_title()
        assert "d = 10.01" == title
Edge case for data of shape (1, N) or (N, 1).
xarray/tests/test_plot.py