numba 的缺点

先贴链接:Constructs

Supported constructs:

  • conditional branch: if .. elif .. else
  • loops: while, for .. in, break, continue
  • basic generator: yield
  • assertion: assert

Partially supported constructs:

  • exceptions: try .. except, raise, else and finally (See details in this section)
  • context manager: with (only support numba.objmode())
  • list comprehension (see details in this section)

Unsupported constructs:

  • async features: async with, async for and async def
  • class definition: class (except for @jitclass)
  • set, dict and generator comprehensions
  • generator delegation: yield from

可以看到, numba 不支持 dict !!!

所以 numba 的最大的缺点就是不支持 dict

你可能感兴趣的:(python)