numba - TypingError: cannot determine Numba type of

后端 未结 2 1382
自闭症患者
自闭症患者 2021-02-14 05:38

I have a simple function to rank poker hands (the hands are strings).

I call it with rA,rB = rank(a),rank(b) and here is my implementation. Works well witho

2条回答
  •  我寻月下人不归
    2021-02-14 06:16

    Per the deprecation recommendations, it's very reasonable that code which doesn't compile with @jit(nopython=True) could be faster without the decorator.

    Anecdotally, I found the trivial example I landed here researching was notably faster when simply passing the Pandas columns directly to my function to vectorize the operation, rather than using numba and paying the method overhead of the columns for a numpy array.

    However, it continues with the expected argument to clear this warning

    If there is benefit to having the @jit decorator present, then to be future proof supply the keyword argument forceobj=True to ensure the function is always compiled in object mode.

提交回复
热议问题