I have a tuple/list like so:
tup = (1, 2, 3, 4, 5)
f = [ (e, d, c, b, a) for a in tup for b in tup for c in tup for d in tup for e in tup ]
How do I create an equivalent array directly from NumPy without using np.array( f )
? Is there some slicing technique that I should use on tup
? Is what I am asking for possible?
I am specifically asking if NumPy can do this directly, for e.g via some slicing technique or some NumPy function, without using other python functions. I am trying to better understand the capabilities of NumPy.
Thank you.