Skip to content

adding few functions for right and left legs collision #14

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hrahmanin
Copy link
Collaborator

No description provided.

@hrahmanin hrahmanin requested a review from gfudenberg January 16, 2025 03:43
@golobor
Copy link
Member

golobor commented Jan 16, 2025

could you please exclude .ipynb_checkpoints from the commit?
(typically, this is prevented via .gitignore)

@golobor
Copy link
Member

golobor commented Jan 16, 2025

another minor suggestion - i think there may be a much more efficient implementation of the search via np.searchsorted(l_sites, r_sites)

@hrahmanin
Copy link
Collaborator Author

@golobor Thanks for your comment regarding the np.searchsorted function. I now understand that it finds the positions where elements should be inserted to maintain order between two lists. However, in my case, I'm looking for elements with an exact difference of 1 between the arrays.

@golobor
Copy link
Member

golobor commented Feb 10, 2025

Hi Hadi,
You're right, but my point is that you could speed up your algorithm if you were to use searchsorted to find consecutive legs of smcs and then checking for distance==1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants