Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/ml_dtypes/__init__.py: 98%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

40 statements  

1# Copyright 2022 The ml_dtypes Authors. 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14 

15__version__ = "0.5.4" 

16__all__ = [ 

17 "__version__", 

18 "bfloat16", 

19 "finfo", 

20 "float4_e2m1fn", 

21 "float6_e2m3fn", 

22 "float6_e3m2fn", 

23 "float8_e3m4", 

24 "float8_e4m3", 

25 "float8_e4m3b11fnuz", 

26 "float8_e4m3fn", 

27 "float8_e4m3fnuz", 

28 "float8_e5m2", 

29 "float8_e5m2fnuz", 

30 "float8_e8m0fnu", 

31 "iinfo", 

32 "int2", 

33 "int4", 

34 "uint2", 

35 "uint4", 

36] 

37 

38from typing import Type 

39 

40from ml_dtypes._finfo import finfo 

41from ml_dtypes._iinfo import iinfo 

42from ml_dtypes._ml_dtypes_ext import bfloat16 

43from ml_dtypes._ml_dtypes_ext import float4_e2m1fn 

44from ml_dtypes._ml_dtypes_ext import float6_e2m3fn 

45from ml_dtypes._ml_dtypes_ext import float6_e3m2fn 

46from ml_dtypes._ml_dtypes_ext import float8_e3m4 

47from ml_dtypes._ml_dtypes_ext import float8_e4m3 

48from ml_dtypes._ml_dtypes_ext import float8_e4m3b11fnuz 

49from ml_dtypes._ml_dtypes_ext import float8_e4m3fn 

50from ml_dtypes._ml_dtypes_ext import float8_e4m3fnuz 

51from ml_dtypes._ml_dtypes_ext import float8_e5m2 

52from ml_dtypes._ml_dtypes_ext import float8_e5m2fnuz 

53from ml_dtypes._ml_dtypes_ext import float8_e8m0fnu 

54from ml_dtypes._ml_dtypes_ext import int2 

55from ml_dtypes._ml_dtypes_ext import int4 

56from ml_dtypes._ml_dtypes_ext import uint2 

57from ml_dtypes._ml_dtypes_ext import uint4 

58import numpy as np 

59 

60bfloat16: Type[np.generic] 

61float4_e2m1fn: Type[np.generic] 

62float6_e2m3fn: Type[np.generic] 

63float6_e3m2fn: Type[np.generic] 

64float8_e3m4: Type[np.generic] 

65float8_e4m3: Type[np.generic] 

66float8_e4m3b11fnuz: Type[np.generic] 

67float8_e4m3fn: Type[np.generic] 

68float8_e4m3fnuz: Type[np.generic] 

69float8_e5m2: Type[np.generic] 

70float8_e5m2fnuz: Type[np.generic] 

71float8_e8m0fnu: Type[np.generic] 

72int2: Type[np.generic] 

73int4: Type[np.generic] 

74uint2: Type[np.generic] 

75uint4: Type[np.generic] 

76 

77del np, Type