-
Notifications
You must be signed in to change notification settings - Fork 13
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
Extracting the indices of the contour #66
Comments
In short, there are not provisions for this in the top level API. However, the data structures used for the extraction preserve the indices as a hash: Lines 224 to 232 in 32602e7
The key would be to modify this function here: Lines 242 to 264 in 32602e7
The It should be possible to add as a feature here. Unfortunately I am quite busy with other projects so I cannot do it myself. I am happy to advise where I can and review any PRs. Though we should probably create a non-API breaking way to do this. There is an example of adding a new algorithm in #56 that is non-breaking (though that algorithm is broke, I think, it has been a while :). |
Thank you for the detailed response! Is it reasonable to modify
with a function
To mimic how P.S. I'm very new to collaborating with other people on stuff so bear with me. |
I would consider modifying |
Sorry for the trivial questions but this is a learning moment for me. Why is adding a field to a user facing structure considered breaking? I can understand renaming or removing fields of course, but what's wrong with adding fields? As for Line 242 in 32602e7
to add two new parameters
where Line 257 in 32602e7
to something like
Is this what you're suggesting? I'm not sure how to make I don't have access to a computer with Julia at the moment but I'll try to play around with this as soon as I do. I'm just stuck theory crafting till then. |
I appreciate the questions, so no worries. Adding a field may seem non-breaking in the Julia ecosystem. There may be macros or memory assumptions about the layout of data that may make it breaking. Similarly we are going to use more memory in this approach and the algo will likely be slower, so it is a good idea to keep it as a different algorithm. This is me being over conservative to avoid any regressions or upstream issues. The approach seems about right. If we setup a different type assuming the entry point will be something like I may have some time next weekend to work on this. Also feel free to ping me on the Julia slack if you are there. |
Let's take the sample code from the documentation
I need the indices of
xs
andys
inx
andy
, i.e.in a simple world this would be:However,
xs
andys
do not belong exactly tox
andy
, and I can't figure out how to extract the indices. The reason I need to do this is that I have an auxiliary arrayw
that has the same shape asz
, and I would like to extract the part corresponding to the contours.Is there some way to do this? Does contour.jl return the indices somehow?
The text was updated successfully, but these errors were encountered: