MCPcopy Create free account
hub / github.com/dask/dask / test_nanquantile_method

Function test_nanquantile_method

dask/array/tests/test_reductions.py:1234–1247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1232
1233
1234def test_nanquantile_method():
1235 shape = 10, 15, 20, 15
1236 arr = np.random.randn(*shape)
1237 indexer = np.random.randint(0, 10, size=shape)
1238 arr[indexer >= 8] = np.nan
1239 darr = da.from_array(arr, chunks=(2, 3, 4, -1))
1240 assert_eq(
1241 da.nanquantile(darr, 0.75, axis=-1, method="weibull"),
1242 np.nanquantile(arr, 0.75, axis=-1, method="weibull"),
1243 )
1244 assert_eq(
1245 da.nanpercentile(darr, 0.75, axis=-1, method="weibull"),
1246 np.nanpercentile(arr, 0.75, axis=-1, method="weibull"),
1247 )
1248
1249
1250def test_nanquantile_one_dim():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
randintMethod · 0.45

Tested by

no test coverage detected