Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(14)  |  Derive(0)  |  Import(1)

src/g/s/gsdview-HEAD/gsdview/tests/test_lut.py   gsdview(Download)
 
import numpy as np
from gsdview.imgutils import linear_lut
 
 
class TestLinearLUT(unittest.TestCase):
    def test_all_defaults(self):
        lut = linear_lut()
    def test_dtype_uint8(self):
        lut = linear_lut(dtype='uint8')
        self.assertEqual(lut.dtype, np.uint8)
        self.assertTrue(np.all(lut == np.arange(2 ** 8, dtype='uint8')))
 
    def test_dtype_uint16(self):
        lut = linear_lut(dtype='uint16')
    def test_fill_false1(self):
        lut = linear_lut(100, 199)
        self.assertEqual(len(lut), 200)
 
    def test_fill_false2(self):