home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 288590846

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1317#issuecomment-288590846 https://api.github.com/repos/pydata/xarray/issues/1317 288590846 MDEyOklzc3VlQ29tbWVudDI4ODU5MDg0Ng== 1386642 2017-03-23T01:32:55Z 2017-03-23T01:32:55Z CONTRIBUTOR

Cool! Thanks for that link. As far as the API is concerned, I think I like the ReshapeCoder approach a little better because it does not require keeping track of a feature_dims vector list throughout the code, like my class does. It also could generalize beyond just creating a 2D array.

To produce a dataset B(samples,features) from a dataset A(x,y,z,t) how do you feel about a syntax like this: ```python rs = Reshaper(dict(samples=('t',), features=('x', 'y', 'z')), coords=A.coords)

B = rs.encode(A)

,,eofs =svd(B.data)

eofs is now a 2D dask array so we need to give

it dimension information

eof_dims = ['mode', 'features'] rs.decode(eofs, eof_dims)

to decode XArray object we don't need to pass dimension info

rs.decode(B) ```

On the other hand, it would be nice to be able to reshape data through a syntax like

A.reshape.encode(dict(...))
{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  216215022
Powered by Datasette · Queries took 0.666ms · About: xarray-datasette