Random int64 and float64 numbers

前端 未结 5 1186
失恋的感觉
失恋的感觉 2021-02-14 19:07

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:38

    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

提交回复
热议问题