Random int64 and float64 numbers

前端 未结 5 2211
孤独总比滥情好
孤独总比滥情好 2021-02-14 19:00

I\'m trying to generate random 64-bit integer values for integers and floats using Numpy, within the entire range of valid values for that type. To generate ran

5条回答
  •  星月不相逢
    2021-02-14 19:15

    I don't believe it refers to the random seed call. The simplest code I've got that falls into "Python int too large to convert to C long" is:

    x = numpy.random.random_integers(2**64,size=(SIZE,)).astype(numpy.uint64)
    

    numpy.version=1.5.0 here

提交回复
热议问题