MCPcopy Create free account
hub / github.com/PyTables/PyTables / get_sliced_vars2

Function get_sliced_vars2

tables/tests/test_expression.py:31–37  ·  view source on GitHub ↗
(npvars, start, stop, step, shape, maindim)

Source from the content-addressed store, hash-verified

29
30
31def get_sliced_vars2(npvars, start, stop, step, shape, maindim):
32 npvars_ = {}
33 slices = [slice(None) for dim in shape]
34 slices[maindim] = slice(start, stop, step)
35 for name, var in npvars.items():
36 npvars_[name] = var.__getitem__(tuple(slices))
37 return npvars_
38
39
40# Basic tests

Callers 3

test01a_sssMethod · 0.85
test01b_sssMethod · 0.85
test01c_sssMethod · 0.85

Calls 2

itemsMethod · 0.45
__getitem__Method · 0.45

Tested by

no test coverage detected