Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of np.array with one dimension only. #160

Closed
oskrgab opened this issue Oct 19, 2024 · 1 comment
Closed

Handling of np.array with one dimension only. #160

oskrgab opened this issue Oct 19, 2024 · 1 comment
Milestone

Comments

@oskrgab
Copy link

oskrgab commented Oct 19, 2024

There is an IndexError when writing np.arrays that have one dimension only, i.e. shape = (x, ). This is a common result in machine learning workflows, specially when running the predict method on an estimator.

image

The image shows a possible solution. This has some drawbacks, though, as the user could force the array to have a shape of (x, 1), and then it would work without modification to the object in the screenshot. The problem with letting the user doing is that might lead to lots of conversions to get the desired result, and it might break the consistency across user's workflows who might expect this to work out of the box.

@fzumstein
Copy link
Member

Oops, looks like too many DataFrames let you forget how numpy works...
I'd suggest an easier solution that will also cover higher order arrays, see #161

@fzumstein fzumstein added this to the 0.6.2 milestone Oct 20, 2024
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

No branches or pull requests

2 participants