MCPcopy Create free account
hub / github.com/Singular/Singular / cartn

Function cartn

Singular/dyn_modules/python/cart.py:20–22  ·  view source on GitHub ↗
(sequence, n)

Source from the content-addressed store, hash-verified

18 return rloop(seqin,[])
19
20def cartn(sequence, n):
21 tocombine=list(itertools.repeat(sequence,n))
22 return list(map(tuple,xcombine(*tocombine)))
23
24if __name__=='__main__':
25 for i in cartn([1,2,3],4):

Callers 1

cart.pyFile · 0.85

Calls 3

listClass · 0.85
mapFunction · 0.85
xcombineFunction · 0.85

Tested by

no test coverage detected