numba jit: 'DataFlowAnalysis' object has no attribute 'op_STORE_DEREF'
<p>I'm trying to run the following code with numba but get an error:</p>

<pre><code>from numba import jit

@jit(nopython=True)
def create_card_deck():
    values = "23456789TJQKA"
    suites = "CDHS"
    Deck = []
    [Deck.append(x + y) for x in values for y in suites]
    return Deck

create_card_deck()
</code></pre>

<p>Any suggestions what is causing this error are appreciated:</p>

<pre><code>'DataFlowAnalysis' object has no attribute 'op_STORE_DEREF'
</code></pre>

<p>There are two problems here - the more fundamental one is that <code>numba</code> doesn't support strings in <code>nopython</code> mode</p>

<pre><code>@jit(nopython=True)
def create_card_deck():
    values = "23456789TJQKA"
    suites = "CDHS"
    return values

In [4]: create_card_deck()
---------------------------------------------------------------------------
NotImplementedError : Failed at nopython (nopython mode backend)
cannot convert native str to Python object
</code></pre>

<p>That specific error is because list comprehensions are also not currently supported in nopython mode.</p>

<p><a href="https://github.com/numba/numba/issues/504" rel="nofollow">https://github.com/numba/numba/issues/504</a></p>

python jit numba