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

Ambiguous field/particle type: special pixel-fields #3381

Closed
neutrinoceros opened this issue Jun 28, 2021 · 1 comment · Fixed by #3949
Closed

Ambiguous field/particle type: special pixel-fields #3381

neutrinoceros opened this issue Jun 28, 2021 · 1 comment · Fixed by #3949
Labels
api-consistency naming conventions, code deduplication, informative error messages, code smells... deprecation deprecate features or remove deprecated ones release critical Highest priority (in a milestone)
Milestone

Comments

@neutrinoceros
Copy link
Member

Bug report

Bug summary

Right now when running for instance

pytest yt/frontends/ytdata/tests/test_unit.py

one gets deprecation warnings matching the following regexp

r"The requested field name 'pd?[xyz]' is ambiguous and corresponds to any one of the following field types.*"

This is because internally, slicing and coordinate handler classes are using some special, pixel-related "fields" "px", "py", "pz", "pdx", "pdy" and "pdz", but leave the field (particle) type unspecified.
There doesn't seem to be an obvious path to follow here to resolve the warnings, that would work with every kind of dataset (grid/particles). Ideally we should be able to determine the appropriate type at runtime but this is currently not trivial according to discussions with @cphyc.
This will need to be resolved somehow in order to fully remove compatibility with ambiguous fields, as is targeted for yt 4.1.0

Right now I'm going to ignore this warning in #3380, but I'll reference this issue in the code (specifically in conftest.py) to keep track of it.

@neutrinoceros neutrinoceros added the api-consistency naming conventions, code deduplication, informative error messages, code smells... label Jun 28, 2021
@neutrinoceros neutrinoceros added this to the 4.1.0 milestone Jun 28, 2021
@neutrinoceros neutrinoceros added release critical Highest priority (in a milestone) deprecation deprecate features or remove deprecated ones labels May 22, 2022
@neutrinoceros
Copy link
Member Author

I think this specific problem is another aspect of #3839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-consistency naming conventions, code deduplication, informative error messages, code smells... deprecation deprecate features or remove deprecated ones release critical Highest priority (in a milestone)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant