File tree Expand file tree Collapse file tree 5 files changed +45
-5
lines changed
Expand file tree Collapse file tree 5 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+
13from pandas import (
24 api as api ,
35 arrays as arrays ,
@@ -47,7 +49,6 @@ from pandas.core.api import (
4749 UInt16Dtype as UInt16Dtype ,
4850 UInt32Dtype as UInt32Dtype ,
4951 UInt64Dtype as UInt64Dtype ,
50- array as array ,
5152 bdate_range as bdate_range ,
5253 date_range as date_range ,
5354 factorize as factorize ,
@@ -154,4 +155,11 @@ from pandas.io.json._normalize import (
154155from pandas .tseries import offsets as offsets
155156from pandas .tseries .api import infer_freq as infer_freq
156157
158+ if sys .version_info >= (3 , 11 ):
159+ from pandas .core .construction import array as array
160+ else :
161+ from pandas .core .construction import (
162+ array as array , # pyright: ignore[reportUnknownVariableType]
163+ )
164+
157165__version__ : str
Original file line number Diff line number Diff line change 1+ import sys
2+
13from pandas .core .algorithms import (
24 factorize as factorize ,
35 unique as unique ,
@@ -20,7 +22,6 @@ from pandas.core.arrays.integer import (
2022 UInt64Dtype as UInt64Dtype ,
2123)
2224from pandas .core .arrays .string_ import StringDtype as StringDtype
23- from pandas .core .construction import array as array
2425from pandas .core .frame import DataFrame as DataFrame
2526from pandas .core .groupby import (
2627 Grouper as Grouper ,
@@ -77,3 +78,10 @@ from pandas.core.dtypes.missing import (
7778
7879from pandas .io .formats .format import set_eng_float_format as set_eng_float_format
7980from pandas .tseries .offsets import DateOffset as DateOffset
81+
82+ if sys .version_info >= (3 , 11 ):
83+ from pandas .core .construction import array as array
84+ else :
85+ from pandas .core .construction import (
86+ array as array , # pyright: ignore[reportUnknownVariableType]
87+ )
Original file line number Diff line number Diff line change 1+ import sys
2+
13from pandas .core .arrays .integer import IntegerArray
2- from pandas .core .construction import array
34from typing_extensions import assert_type
45
56from pandas ._libs .missing import NA
67
78from tests import check
89
10+ if sys .version_info >= (3 , 11 ):
11+ from pandas .core .construction import array
12+ else :
13+ from pandas .core .construction import (
14+ array , # pyright: ignore[reportUnknownVariableType]
15+ )
16+
917
1018def test_construction () -> None :
1119 check (assert_type (array ([1 ]), IntegerArray ), IntegerArray )
Original file line number Diff line number Diff line change 1+ import sys
2+
13from pandas .core .arrays .integer import IntegerArray
2- from pandas .core .construction import array
34from typing_extensions import assert_type
45
56from pandas ._libs .missing import NA
67
78from tests import check
89
10+ if sys .version_info >= (3 , 11 ):
11+ from pandas .core .construction import array
12+ else :
13+ from pandas .core .construction import (
14+ array , # pyright: ignore[reportUnknownVariableType]
15+ )
16+
917
1018def test_cumul_int64dtype () -> None :
1119 arr = array ([1 , NA , 2 ])
Original file line number Diff line number Diff line change 11# Test common ExtensionArray methods
2+ import sys
3+
24import numpy as np
35import pandas as pd
46from pandas .core .arrays import ExtensionArray
57from pandas .core .arrays .integer import (
68 Int32Dtype ,
79 IntegerArray ,
810)
9- from pandas .core .construction import array
1011from typing_extensions import assert_type
1112
1213from pandas ._typing import ArrayLike
1718 np_1darray_intp ,
1819)
1920
21+ if sys .version_info >= (3 , 11 ):
22+ from pandas .core .construction import array
23+ else :
24+ from pandas .core .construction import (
25+ array , # pyright: ignore[reportUnknownVariableType]
26+ )
27+
2028
2129def test_ea_common () -> None :
2230 # Note: `ExtensionArray` is abstract, so we use `IntegerArray` for the tests.
You can’t perform that action at this time.
0 commit comments