I need to generate an array in numpy (there are N numbers).
There are only two kinds of element in this array, for example: 3.0 and -3.0. The probability of occurring 3.0 is 0.4, and the probability of occurring -3.0 is 0.6.
How to generate such an array?