8000 rename files · IntelPython/sdc@ac86694 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit ac86694

Browse files
committed
rename files
1 parent 90e436e commit ac86694

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

numba_typing/new_types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
__all__ = ['array', 'number_types', 'pandas', 'special']
2+
__all__ = ['array', 'number_types', 'pandas_series', 'special_LiteralType']
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import typing
2+
import pandas as pd
3+
from abc import abstractmethod
4+
5+
T = typing.TypeVar('T')
6+
S = typing.TypeVar('S')
7+
8+
9+
class Series(typing.Generic[T, S]):
10+
'''Annotation for pandas.Series
11+
For expample: Series[int, str]
12+
int - type of index
13+
str - type of value'''
14+
__slots__ = ()
15+
16+
@abstractmethod
17+
def __array__(self) -> pd.core.series.Series:
18+
pass
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import typing
2+
import number_types
3+
4+
T = typing.TypeVar('T')
5+
6+
7+
class LiteralType(typing.Generic[T]):
8+
pass
9+
10+
11+
class PreferLiteralType(typing.Generic[T]):
12+
pass
13+
14+
15+
class PreferNonLiteralType(typing.Generic[T]):
16+
pass
17+
18+
19+
L_int = LiteralType[int]
20+
L_float = LiteralType[float]
21+
22+
TL_int = LiteralType[number_types.T_int]
23+
TL_float = LiteralType[number_types.T_float]

0 commit comments

Comments
 (0)
0