code: def test_default_clim_non_finite():
      data = np.array([10, np.nan, 5, 15, 25, 15]).astype(np.float32)
      clim = get_default_clim_from_dtype(data.dtype)
      assert clim == (0, 1)
      clim = get_default_clim_from_data(data)
      assert clim == (5, 25)
  
      data = np.array([10, np.inf, 5, 15, 25, 15]).astype(np.float32)
      clim = get_default_clim_from_dtype(data.dtype)
      assert clim == (0, 1)
      clim = get_default_clim_from_data(data)
      assert clim == (5, 25)
  
      data = np.array([10, -np.inf, 5, 15, 25, 15]).astype(np.float32)
      clim = get_default_clim_from_dtype(data.dtype)
      assert clim == (0, 1)
      clim = get_default_clim_from_data(data)
      assert clim == (5, 25)
  
      data = np.array([np.nan, np.nan, np.nan]).astype(np.float32)
      clim = get_default_clim_from_dtype(data.dtype)
      assert clim == (0, 1)
      clim = get_default_clim_from_data(data)
      assert clim == (0, 0)
  
      data = np.array([np.nan, np.inf, -np.inf]).astype(np.float32)
      clim = get_default_clim_from_dtype(data.dtype)
      assert clim == (0, 1)
      clim = get_default_clim_from_data(data)
      assert clim == (0, 0)
  
file_path: vispy/vispy/visuals/tests/test_scalable_textures.py
imports: import numpy
  import pytest
  from vispy.testing import run_tests_if_main
  from vispy.visuals._scalable_textures import get_default_clim_from_dtype, get_default_clim_from_data, CPUScaledTextureMixin, GPUScaledTextureMixin
label_desc: Use image node_id 2 for calling a global function with example usage: test_default_clim_non_finite() without return types