class_docstr: Test drawing individual pixels.
docstr: Ensure that plotting behavior is consistent if we have a singleton dim for the color.
docstr_tok: ["Ensure","that","plotting","behavior","is","consistent","if","we","have","a","singleton","dim","for","the","color","."]
code: def test_draw_point2d_with_singleton_color_dims(self, dtype, device):
      """Ensure that plotting behavior is consistent if we have a singleton dim for the color."""
      points = torch.tensor([(1, 3), (2, 4)], device=device)
      # Plot given a color tensor of shape [3]
      color_vec = torch.tensor(
          [5, 10, 15], dtype=torch.float32, device=device
      )
      vec_img = torch.zeros(3, 8, 8, dtype=torch.uint8, device=device)
      drawn_vec_img = draw_point2d(vec_img, points, color_vec)
      # Plot given a color tensor of shape [3, 1]
      color_mat = torch.unsqueeze(color_vec, dim=1)
      mat_img = vec_img.clone()
      drawn_mat_img = draw_point2d(mat_img, points, color_mat)
      # Ensure that we get the same underlying image back
      assert_close(drawn_vec_img, drawn_mat_img)
  
imports: import math
  import pytest
  import torch
  from kornia.testing import assert_close
  from kornia.utils import create_meshgrid, draw_convex_polygon, draw_rectangle
  from kornia.utils.draw import draw_line, draw_point2d
label_desc: Use image node_id 6 for calling the TestDrawPoint obj's underlying member method code with example usage: obj.test_draw_point2d_with_singleton_color_dims(dtype, device) without return types