issues: 502060636
This data as json
| 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 502060636 | MDU6SXNzdWU1MDIwNjA2MzY= | 3368 | Shift DataArray along a coordinate for different values of each element of another coordinate | 49461634 | closed | 0 | 1 | 2019-10-03T13:17:10Z | 2020-03-29T14:18:11Z | 2020-03-29T14:16:43Z | NONE | MCVE Code Sample```python Your code hereOriginal_DataArray = <xarray.DataArray 'Conexões Domésticas e Piscinas' (projetos_resi: 9, res_segmentacao: 21, time: 133, bands: 10)> Shift_Map = <xarray.DataArray 'Anos por Desconto' (res_segmentacao: 21)> array([ 0, 0, 0, 24, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 36, 60, 36, 0]) "Multi" Shift Functiondef _fn(dataArray,over_shift_index,multi_shift_index,shift_map,initialValues=None):
"""
``` Expected OutputSame estructure DataArray shifted along the "time" coordinate by a different value for each element of the "res_segmentacao" coordinate.
Problem DescriptionI´ve reached my objective but I wanted to consult if anyone had donde this in a more efficient way. Thanks! |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3368/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |