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

🔎 Simplify RaggedArray API #482

Open
philippemiron opened this issue Jun 25, 2024 · 0 comments
Open

🔎 Simplify RaggedArray API #482

philippemiron opened this issue Jun 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@philippemiron
Copy link
Contributor

philippemiron commented Jun 25, 2024

Currently, the RaggedArray object can be created with:

class RaggedArray:
    def __init__(
        self,
        coords: dict,
        metadata: dict,
        data: dict,
        attrs_global: dict | None = {},
        attrs_variables: dict | None = {},
        name_dims: dict[str, DimNames] = {},
        coord_dims: dict[str, str] = {},
    ):

We could simplify the required arguments by implementing:

  • add a default value for name_dims = {"rows": "rows", "obs": "obs"}
  • coord_dims: could this be replaced by a function? The coordinates can either be the size of the rows or the obs so they could be assigned automatically.
@philippemiron philippemiron added the enhancement New feature or request label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant