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

Pandas error durind _find_elite #2

Open
fpartika opened this issue Sep 16, 2022 · 0 comments
Open

Pandas error durind _find_elite #2

fpartika opened this issue Sep 16, 2022 · 0 comments

Comments

@fpartika
Copy link

fpartika commented Sep 16, 2022

At first congrats for the initiative, your implementation is brilliant!

I'm getting sporadically the same error in line:

weights_sorted = pd.Series(self._generation, index=scores).sort_index(ascending=False)

that is triggered from inside the series.py inside pandas, at the code:

        elif is_list_like(data):

            # a scalar numpy array is list-like but doesn't
            # have a proper length
            try:
                if len(index) != len(data):
                    raise ValueError(
                        f"Length of passed values is {len(data)}, "
                        f"index implies {len(index)}."

What I noticed is that this only occurs when index become (for some reason) a pandas Multindex instead of a list of arrays, it raises the following error message:

ValueError: Length of passed values is 14, index implies 1.

Thanks!

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

1 participant