-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Open
Labels
BugConstructorsSeries/DataFrame/Index/pd.array ConstructorsSeries/DataFrame/Index/pd.array ConstructorsError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasNested DataData where the values are collections (lists, sets, dicts, objects, etc.).Data where the values are collections (lists, sets, dicts, objects, etc.).
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
a = pd.array(np.array([[1], [2]])) #Raises an error
a = pd.array(np.array([[1], ['a']])) #Does not raise an errorIssue Description
pandas.array API mentions that it expects 1-D arrays as input. But, in some cases, it works fine with 2-D arrays.
Should not it raise an error?
Expected Behavior
It should show the same behaviour for same kind of input.
Installed Versions
Installed Versions
python : 3.12.12
OS : Windows
OS-release : 11
pandas : 2.3.3
numpy : 2.3.4
Metadata
Metadata
Assignees
Labels
BugConstructorsSeries/DataFrame/Index/pd.array ConstructorsSeries/DataFrame/Index/pd.array ConstructorsError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasNested DataData where the values are collections (lists, sets, dicts, objects, etc.).Data where the values are collections (lists, sets, dicts, objects, etc.).