MCPcopy Index your code
hub / github.com/RustPython/RustPython / farray

Function farray

Lib/test/test_buffer.py:319–322  ·  view source on GitHub ↗
(items, shape)

Source from the content-addressed store, hash-verified

317 return _ca(items, shape)
318
319def farray(items, shape):
320 if listp(items) and not 0 in shape and prod(shape) != len(items):
321 raise ValueError("prod(shape) != len(items)")
322 return _fa(items, shape)
323
324def indices(shape):
325 """Generate all possible tuples of indices."""

Calls 4

listpFunction · 0.85
lenFunction · 0.85
_faFunction · 0.85
prodFunction · 0.70

Tested by

no test coverage detected