class_docstr: Test generic image reader.
class_docstr_tok: ["Test","generic","image","reader","."]
docstr: Test reading TIFF images originally containing NaN values via satpy.Scene().
docstr_tok: ["Test","reading","TIFF","images","originally","containing","NaN","values","via","satpy.Scene","(",")","."]
code: def test_geotiff_scene_nan(self):
      """Test reading TIFF images originally containing NaN values via satpy.Scene()."""
      from satpy import Scene
  
      fname = os.path.join(self.base_dir, "test_l_nan_fillvalue.tif")
      scn = Scene(reader="generic_image", filenames=[fname])
      scn.load(["image"])
      assert scn["image"].shape == (1, self.y_size, self.x_size)
      assert np.sum(scn["image"].data[0][:10, :10].compute()) == 0
  
      fname = os.path.join(self.base_dir, "test_l_nan_nofillvalue.tif")
      scn = Scene(reader="generic_image", filenames=[fname])
      scn.load(["image"])
      assert scn["image"].shape == (1, self.y_size, self.x_size)
      assert np.all(np.isnan(scn["image"].data[0][:10, :10].compute()))
  
file_path: satpy/satpy/tests/reader_tests/test_generic_image.py
imports: import os
  import unittest
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling the TestGenericImage obj's underlying member method code with example usage: obj.test_geotiff_scene_nan() without return types