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

Invalid dtype for AequilibraeMatrix index for memory_only matrix #424

Closed
elfjes opened this issue Jun 28, 2023 · 2 comments · Fixed by #425
Closed

Invalid dtype for AequilibraeMatrix index for memory_only matrix #424

elfjes opened this issue Jun 28, 2023 · 2 comments · Fixed by #425

Comments

@elfjes
Copy link
Contributor

elfjes commented Jun 28, 2023

First of all, I like the new(ish) support for memory only matrices, and the performance benefits it offers. Edit: is it relatively new, or did just the default change recently?

However, I did run into an issue. When creating the indices for the AequilibraeMatrix, the numpy array has a float dtype, which means it can't actually be used for indexing:

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

So I created a fix, PR coming up.

@pedrocamargo
Copy link
Contributor

I came across that issue as well, but I was just overriding the indices when I could not that to work instead of digging to find the issue. Thanks for finding it, @elfjes . Are you guys enjoying the much better performance already?

@elfjes
Copy link
Contributor Author

elfjes commented Jun 28, 2023

Yeah, that's my workaround for now as well :)

haven't run any benchmarks yet, but definitely gonna give it a go

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 a pull request may close this issue.

2 participants