File: test_asgray.py

package info (click to toggle)
python-imgviz 1.5.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,132 kB
  • sloc: python: 3,354; makefile: 15
file content (11 lines) | stat: -rw-r--r-- 187 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
import numpy as np

import imgviz


def test_asgray():
    data = imgviz.data.arc2017()
    gray = imgviz.asgray(data["rgb"])

    assert gray.ndim == 2
    assert gray.dtype == np.uint8