issue_comments: 663157223
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/4235#issuecomment-663157223 | https://api.github.com/repos/pydata/xarray/issues/4235 | 663157223 | MDEyOklzc3VlQ29tbWVudDY2MzE1NzIyMw== | 8419157 | 2020-07-23T18:15:33Z | 2020-07-23T18:18:24Z | NONE | To give a bit more context, an example code simulating an experimental measurement. ``` import numpy as np import xarray as xr from scipy.stats import norm from matplotlib import pyplot as plt nominal xx = xr.DataArray(np.arange(-10, 10, 0.1), dims='index', name='x') Shift locloc = xr.DataArray(np.arange(-0.5, 1, 0.5), dims='loc', name='loc') Number of experimentsexp = xr.DataArray(range(3), dims='exp', name='exp') Add noise to x per experimentnoise = xr.DataArray(np.random.rand(len(x), len(loc)), coords={'loc': loc}, dims=['index', 'loc']) x = x + noise * 0.5 Measurey = xr.apply_ufunc( norm.pdf, x, x['loc'], 1, input_core_dims=[['index'], [], []], output_core_dims=[['index']], vectorize=True ) NameMergedata = xr.merge([x, y])
Plot y against xdata.plot.line(x='x', y='y', hue='loc')
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
659142025 |