Skip to content

Conversation

@antareepsarkar
Copy link

@antareepsarkar antareepsarkar commented Nov 10, 2025

Description

It checks the value of ndim when the argument for data is an np.ndarray in pandas.array(data, dtype=None, copy=True)

Reason

import pandas as pd
a = pd.array(np.array([[1], [2]]))

Raises an error because the array is 2-D

import pandas as pd
a = pd.array(np.array([[1], ['a']]))

Does not raise an error in this case(maybe, because the value is now a string). But, it should raise an error as only 1-D arrays can be passed as arguments.

@antareepsarkar antareepsarkar marked this pull request as draft November 11, 2025 05:33
@antareepsarkar antareepsarkar marked this pull request as ready for review November 11, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant