Python MemoryError in Scipy Radial Basis Function (scipy.interpolate.rbf)

前端 未结 1 371
广开言路
广开言路 2021-01-02 19:13

I\'m trying to interpolate a not-so-large (~10.000 samples) pointcloud representing a 2D surface, using Scipy Radial Basis Function (Rbf). I got some good results, but with

相关标签:
1条回答
  • 2021-01-02 19:16

    Your dataset should be fine: the error appears because you don't have enough RAM to store the result of the subtraction.

    According to the broadcasting rules, the result will have shape

     (2, 10744,     1)
    -(2,     1, 10744)
    ------------------
     (2, 10744, 10744)
    

    Assuming these are arrays of dtype float64, you need 2*10744**2*8 = 1.72 GiB of free memory. If there isn't enough free memory, numpy won't be able to allocate the output array and will immediately fail with the error you see.

    0 讨论(0)
提交回复
热议问题