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

indexes as ordered set - issue in code #380

Open
maxvolpi opened this issue Sep 7, 2023 · 0 comments
Open

indexes as ordered set - issue in code #380

maxvolpi opened this issue Sep 7, 2023 · 0 comments

Comments

@maxvolpi
Copy link

maxvolpi commented Sep 7, 2023

I am trying to reproduce the code on page 107 of the first edition (and it is the same on Github).
When I do indA & indB I get a strange result: [0,3,5, 7,9] while if I use the code set(indA) & set(indB) I get the expected result
{3,5,7}. I also get the same correct result if I use the method indA.intersection(indB).

Likewise, I get funny results with | and ^. while the equivalent set operations and the methods all work.

It is not clear why this is happening, as I have tried it from scratch a few times, to avoid typos

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