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/735#issuecomment-458573711,https://api.github.com/repos/pydata/xarray/issues/735,458573711,MDEyOklzc3VlQ29tbWVudDQ1ODU3MzcxMQ==,26384082,2019-01-29T15:05:51Z,2019-01-29T15:05:51Z,NONE,"In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,129919128 https://github.com/pydata/xarray/issues/735#issuecomment-177362496,https://api.github.com/repos/pydata/xarray/issues/735,177362496,MDEyOklzc3VlQ29tbWVudDE3NzM2MjQ5Ng==,1217238,2016-01-31T02:22:53Z,2016-01-31T02:22:53Z,MEMBER,"Looks like it would be worth writing a cross-compatible `vnorm` in `xarray/core/ops.py`. Take a look at that module for [examples](https://github.com/pydata/xarray/blob/v0.7.0/xarray/core/ops.py#L161-L165) of how we wrote custom wrapper -- this should be pretty straightforward ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,129919128 https://github.com/pydata/xarray/issues/735#issuecomment-177039255,https://api.github.com/repos/pydata/xarray/issues/735,177039255,MDEyOklzc3VlQ29tbWVudDE3NzAzOTI1NQ==,15167171,2016-01-30T01:18:08Z,2016-01-30T01:26:34Z,NONE,"Note I mis-typed `vecnorm` instead of `vnorm` previously. > I would be OK adding a norm method, although I don't think there's a super strong need for it -- usually I've been happy writing expressions like (x *\* 2).sum(['shapes', 'x']) *\* 0.5 instead. When using large dask arrays that operation tended to fill up ram. I'm not sure why, but it made the dask objects very large, I don't have a good understanding of how those graphs are constructed so I was unable to track down the problem. I tried out `da.std(['shapes', 'x'])` and it worked like a charm, but it felt a little silly rescaling it to get the norm. > You would either need to implement this all in xarray, or preferably write da.linalg.norm in dask and use that take. Take a look at the scipy source code for this function -- I suspect you could port this almost directly to dask. `dask` has a `vnorm`, http://dask.pydata.org/en/latest/array-api.html?highlight=norm#dask.array.core.Array.vnorm which I am currently trying to make use of, using the very helpful: `ops._dask_or_eager_func('vnorm', n_array_args=1)` unfortunately numpy calls their norm `norm` as opposed to `vnorm` so I think I'll need to put in a switch depending on the array type before hitting `_dask_or_eager_func` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,129919128 https://github.com/pydata/xarray/issues/735#issuecomment-177035840,https://api.github.com/repos/pydata/xarray/issues/735,177035840,MDEyOklzc3VlQ29tbWVudDE3NzAzNTg0MA==,1217238,2016-01-30T01:02:10Z,2016-01-30T01:02:18Z,MEMBER,"I would be OK adding a `norm` method, although I don't think there's a super strong need for it -- usually I've been happy writing expressions like `(x ** 2).sum(['shapes', 'x']) ** 0.5` instead. You would either need to implement this all in xarray, or preferably write `da.linalg.norm` in dask and use that take. Take a look at [the scipy source code](https://github.com/numpy/numpy/blob/v1.10.0/numpy/linalg/linalg.py#L1976-L2221) for this function -- I suspect you could port this almost directly to dask. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,129919128