Skip to content

Commit de14a96

Browse files
committed
Update imports
1 parent f6e0c45 commit de14a96

File tree

2 files changed

+14
-30
lines changed

2 files changed

+14
-30
lines changed

singlestoredb/functions/typing/numpy.py

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,6 @@
66
import numpy.typing as npt
77
from numpy import array # noqa: F401
88

9-
NDArray = npt.NDArray
10-
11-
StringArray = StrArray = npt.NDArray[np.str_]
12-
BytesArray = npt.NDArray[np.bytes_]
13-
Float16Array = HalfArray = npt.NDArray[np.float16]
14-
Float32Array = FloatArray = npt.NDArray[np.float32]
15-
Float64Array = DoubleArray = npt.NDArray[np.float64]
16-
IntArray = npt.NDArray[np.int_]
17-
Int8Array = npt.NDArray[np.int8]
18-
Int16Array = npt.NDArray[np.int16]
19-
Int32Array = npt.NDArray[np.int32]
20-
Int64Array = npt.NDArray[np.int64]
21-
UInt8Array = npt.NDArray[np.uint8]
22-
UInt16Array = npt.NDArray[np.uint16]
23-
UInt32Array = npt.NDArray[np.uint32]
24-
UInt64Array = npt.NDArray[np.uint64]
25-
DateTimeArray = npt.NDArray[np.datetime64]
26-
TimeDeltaArray = npt.NDArray[np.timedelta64]
27-
JSONArray = npt.NDArray[np.object_]
28-
=======
299
try:
3010
from typing import TypeAlias # type: ignore
3111
except ImportError:
@@ -48,6 +28,11 @@
4828
npt.NDArray[np.bytes_], UDFAttrs(sql_type=sql_types.BLOB(nullable=False)),
4929
]
5030

31+
Float16Array: TypeAlias = Annotated[
32+
npt.NDArray[np.float16], UDFAttrs(sql_type=sql_types.FLOAT16(nullable=False)),
33+
]
34+
HalfArray: TypeAlias = Float16Array
35+
5136
Float32Array: TypeAlias = Annotated[
5237
npt.NDArray[np.float32], UDFAttrs(sql_type=sql_types.FLOAT(nullable=False)),
5338
]
@@ -128,4 +113,3 @@ def default(self, obj: Any) -> Any:
128113

129114

130115
__all__ = ['array'] + [x for x in globals().keys() if x.endswith('Array')]
131-
>>>>>>> fd486846 (Implement transformers for UDF inputs and outputs)

singlestoredb/tests/ext_funcs/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
from singlestoredb.functions import Masked
1717
from singlestoredb.functions import Table
1818
from singlestoredb.functions import udf
19-
from singlestoredb.functions.dtypes import BIGINT
20-
from singlestoredb.functions.dtypes import BLOB
21-
from singlestoredb.functions.dtypes import BOOL
22-
from singlestoredb.functions.dtypes import DOUBLE
23-
from singlestoredb.functions.dtypes import FLOAT
24-
from singlestoredb.functions.dtypes import MEDIUMINT
25-
from singlestoredb.functions.dtypes import SMALLINT
26-
from singlestoredb.functions.dtypes import TEXT
27-
from singlestoredb.functions.dtypes import TINYINT
19+
from singlestoredb.functions.sql_types import BIGINT
20+
from singlestoredb.functions.sql_types import BLOB
21+
from singlestoredb.functions.sql_types import BOOL
22+
from singlestoredb.functions.sql_types import DOUBLE
23+
from singlestoredb.functions.sql_types import FLOAT
24+
from singlestoredb.functions.sql_types import MEDIUMINT
25+
from singlestoredb.functions.sql_types import SMALLINT
26+
from singlestoredb.functions.sql_types import TEXT
27+
from singlestoredb.functions.sql_types import TINYINT
2828
from singlestoredb.functions.typing import JSON
2929
from singlestoredb.functions.typing import numpy as npt
3030
from singlestoredb.functions.typing import pandas as pdt

0 commit comments

Comments
 (0)