MCPcopy Index your code
hub / github.com/pydata/xarray / make_bench_data

Function make_bench_data

asv_bench/benchmarks/dataarray_missing.py:8–16  ·  view source on GitHub ↗
(shape, frac_nan, chunks)

Source from the content-addressed store, hash-verified

6
7
8def make_bench_data(shape, frac_nan, chunks):
9 vals = randn(shape, frac_nan)
10 coords = {"time": pd.date_range("2000-01-01", freq="D", periods=shape[0])}
11 da = xr.DataArray(vals, dims=("time", "x", "y"), coords=coords)
12
13 if chunks is not None:
14 da = da.chunk(chunks)
15
16 return da
17
18
19class DataArrayMissingInterpolateNA:

Callers 2

setupMethod · 0.85
setupMethod · 0.85

Calls 2

chunkMethod · 0.95
randnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…