code: def test_texture_set_data_different_dtype(
      input_dtype, output_dtype, ndim
  ):
      shape = (20,) * ndim
      data = np.random.rand(*shape).astype(input_dtype)
      Texture = Texture2D if ndim == 2 else Texture3D
  
      tex = Texture(data)
      tex[:10] = np.array(1, dtype=output_dtype)
      tex.set_data(data.astype(output_dtype))
  
imports: import unittest
  import numpy
  import pytest
  from vispy.gloo import Texture1D, Texture2D, Texture3D, TextureAtlas
  from vispy.testing import requires_pyopengl, run_tests_if_main, assert_raises
label_desc: Use image node_id 15 for calling a global function with example usage: test_texture_set_data_different_dtype(input_dtype, output_dtype, ndim) without return types