Fastest way to grow a numpy numeric array

后端 未结 5 2133
后悔当初
后悔当初 2020-11-27 12:01

Requirements:

  • I need to grow an array arbitrarily large from data.
  • I can guess the size (roughly 100-200) with no guarantees that the array will fit
5条回答
  •  旧巷少年郎
    2020-11-27 12:51

    If you want improve performance with list operations, have a look to blist library. It is a optimized implementation of python list and other structures.

    I didn't benchmark it yet but the results in their page seem promising.

提交回复
热议问题