home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where user = 17710617 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 1
  • pull 1

state 1

  • closed 2

repo 1

  • xarray 2
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
530062582 MDU6SXNzdWU1MzAwNjI1ODI= 3582 New accessor for a biomechanics open source library romainmartinez 17710617 closed 1     6 2019-11-28T20:03:22Z 2023-08-02T19:58:35Z 2023-08-02T19:58:35Z CONTRIBUTOR      

Hello and first of all, thank you for xarray.

With a colleague, we created pyomeca which is a Python library specialized in biomechanical data processing. Most of the data is multidimensional and so we have reimplemented by hand some functionality to access labels, etc. Except Xarray does it much better.

I am rewriting the entire library using xarray. motion reimplements the pyomeca functions with an accessor for xarray.

I have some questions about the architecture you recommend for a xarray-based library.

In pyomeca, I have three classes (RotoTrans, Markers3d and Analogs3d) with each having very specific functions.

I have two possible solutions to implement them with xarray: (1) write an accessor for each class or (2) inherit from DataArray, e.g:

```Python import xarray

Rototrans class (xarray.DataArray): pass ```

According to your documentation, the accesor is the recommended method. However, for most functions, I need a three-dimensional table with specific dimensions ([axis, channels, time_frame]) and the accessor does not allow to perform these checks when creating the DataArray. At the same time, the second solution forces me to inherit a basic function that allows me to access the functions common to all classes

```Python import xarray

class BaseArray(xarray.DataArray): def fct(): pass

class Rototrans(Base): pass ```

Do you have any design recommendations?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3582/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
698511838 MDExOlB1bGxSZXF1ZXN0NDg0MzQ2OTUw 4416 Add pyomeca to xarray related project romainmartinez 17710617 closed 0     1 2020-09-10T21:27:17Z 2020-09-12T16:50:24Z 2020-09-12T16:50:17Z CONTRIBUTOR   0 pydata/xarray/pulls/4416
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4416/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 21.279ms · About: xarray-datasette