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

axes_type for backend #102

Open
ahelm opened this issue Jul 29, 2020 · 2 comments
Open

axes_type for backend #102

ahelm opened this issue Jul 29, 2020 · 2 comments
Labels
backend Anything backends

Comments

@ahelm
Copy link
Contributor

ahelm commented Jul 29, 2020

Currently, we only return min and max for the different axes in a
GridBackend. We should consider two things:

  1. Provide an additional Sequence[str] determining what type of axes it is,
    e.g., log, linear, something_else. It should appear in the docs what is possible.
  2. Provide additional attribute axes_values. If this is present discard
    above's logic so that this axes_values are used.

I think the latter point would even provide the possibility to use non-uniform grids.

The updated protocol would be something like this:

class GridBackendType(BackendType, Protocol):
    ...

    axes_type: Sequence[str]

    axes_min: Optional[np.ndarray]
    axes_max: Optional[np.ndarray]

    axes_values: Optional[Sequence[np.ndarray]]

    ...
@fabiocruz
Copy link
Collaborator

Since we now building all values when axes are created, I think this does not apply anymore. Am I wrong, @ahelm?

@fabiocruz fabiocruz added the backend Anything backends label Apr 16, 2021
@ahelm
Copy link
Contributor Author

ahelm commented Apr 16, 2021

No. It still applies. I wanted to include information from the backend if the axis type is not linear. This is currently not addressed, and we should have this somewhere in the backend if we want to have a logarithmic radius simulation 😉 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Anything backends
Projects
None yet
Development

No branches or pull requests

2 participants