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 ,
@@ -157,4 +158,11 @@ from pandas.io.json._normalize import (
157158from pandas .tseries import offsets as offsets
158159from pandas .tseries .api import infer_freq as infer_freq
159160
161+ if sys .version_info >= (3 , 11 ):
162+ from pandas .core .construction import array as array
163+ else :
164+ from pandas .core .construction import (
165+ array as array , # pyright: ignore[reportUnknownVariableType]
166+ )
167+
160168__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 ,
@@ -23,7 +25,6 @@ from pandas.core.arrays.integer import (
2325 UInt64Dtype as UInt64Dtype ,
2426)
2527from pandas .core .arrays .string_ import StringDtype as StringDtype
26- from pandas .core .construction import array as array
2728from pandas .core .frame import DataFrame as DataFrame
2829from pandas .core .groupby import (
2930 Grouper as Grouper ,
@@ -80,3 +81,10 @@ from pandas.core.dtypes.missing import (
8081
8182from pandas .io .formats .format import set_eng_float_format as set_eng_float_format
8283from pandas .tseries .offsets import DateOffset as DateOffset
84+
85+ if sys .version_info >= (3 , 11 ):
86+ from pandas .core .construction import array as array
87+ else :
88+ from pandas .core .construction import (
89+ array as array , # pyright: ignore[reportUnknownVariableType]
90+ )
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