'Missing environment for returning array'

def test_issue_1254(self):

    @jit(nopython=True)
    def random_directions(n):
        for i in range(n):
            vec = np.empty(3)
            vec[:] = 12
            (yield vec)
    outputs = list(random_directions(5))
    self.assertEqual(len(outputs), 5)
    expect = np.empty(3)
    expect[:] = 12
    for got in outputs:
        np.testing.assert_equal(expect, got)
