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

Function carray

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

Source from the content-addressed store, hash-verified

312 return lst
313
314def carray(items, shape):
315 if listp(items) and not 0 in shape and prod(shape) != len(items):
316 raise ValueError("prod(shape) != len(items)")
317 return _ca(items, shape)
318
319def farray(items, shape):
320 if listp(items) and not 0 in shape and prod(shape) != len(items):

Calls 4

listpFunction · 0.85
lenFunction · 0.85
_caFunction · 0.85
prodFunction · 0.70

Tested by

no test coverage detected