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

Expand argument checks and doc on fn contains_sparse(x: List, y: List) -> List #26

Open
sakrejda opened this issue Sep 21, 2023 · 3 comments

Comments

@sakrejda
Copy link

Currently the argument checks in fn contains_sparse(x: List, y: List) -> List do not detect if y is made up of points and fails with a cryptic error.

  • Probably the solution is to short-circuit the calculation and return a correctly-sized list of empty indexes (?)
  • Doc isn't clear about the role of x and y in the asymmetric calculation (AFAICT)
@JosiahParry
Copy link
Owner

@mjbroerman I know you said you wanted to dabble in rust. This is a baby sized chance. Do you want to give this a shot? Happy to guide you!

@JosiahParry
Copy link
Owner

JosiahParry commented Sep 23, 2023

My personal preference is that when x is rs_POINT that it errors out. There is never a case where a point can contain a geometry. I suspect it will always be done in error. Best catch that and precipitate. The class can be check with x.inherits("class_name")

edit: thats a lie: a point can contain a point if they are identical..returning an empty integer vector for each elemnt of the list is probably the best solution

@JosiahParry
Copy link
Owner

@sakrejda, do you have a reproducible example? What is the cryptic error that you're running into?

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

2 participants