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

fixed get_velocities #13

Merged
merged 2 commits into from
Apr 26, 2019
Merged

fixed get_velocities #13

merged 2 commits into from
Apr 26, 2019

Conversation

bartoszpankratz
Copy link
Collaborator

No description provided.

Copy link
Owner

@pszufe pszufe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartoszpankratz avoid using ... because it is basically very slow for long lists.
Rather than that start with an empty SparseArray:

res = SparseArrays.spzeros(length(m.e), length(m.e))

and now simply use the assigment operator to fill it with values (this will also make it possible to avoid creating the temporary V variable:

 res[ind[1], ind[2]] = ............

Copy link
Owner

@pszufe pszufe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@pszufe pszufe merged commit a8de25a into pszufe:master Apr 26, 2019
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.

None yet

2 participants