Coverage for src/ipyvizzu/data/converters/numpy/type_alias.py: 100%

17 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-02-26 10:12 +0000

1""" 

2This module provides typing aliases for numpy converter. 

3""" 

4 

5from typing import Dict, TypeVar, Union 

6 

7 

8Index = int 

9"""Represents the index of a column.""" 

10 

11Name = str 

12"""Represents the name of a column.""" 

13 

14DType = type 

15"""Represents the dtype of a column.""" 

16 

17Unit = str 

18"""Represents the unit of a column.""" 

19 

20ColumnName = Union[Name, Dict[Index, Name]] 

21""" 

22Represents a column name. It is a dictionary of Index:Name pairs 

23or for single-dimensional arrays, it can be just a Name. 

24""" 

25 

26ColumnDtype = Union[DType, Dict[Index, DType]] 

27""" 

28Represents a column dtype. It is a dictionary of Index:DType pairs 

29or for single-dimensional arrays, it can be just a DType. 

30""" 

31 

32ColumnUnit = Union[Unit, Dict[Index, Unit]] 

33""" 

34Represents a column unit. It is a dictionary of Index:Unit pairs 

35or for single-dimensional arrays, it can be just a Unit. 

36""" 

37 

38ColumnConfig = TypeVar("ColumnConfig", Name, DType, Unit) 

39""" 

40Represents a column config. It can be Name, DType or Unit. 

41"""