Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Numpy array or list of random signs

Hi experts!

How can I obtain a numpy array or list of 'N'random signs? for example:

[1, -1, 1, 1 , -1, -1, 1 , 1, 1]

where N = 9.

Waiting for your answers.

Thanks a lot!