No implementation of function Function(<function full at 0x000002D6FE85E5C0>) found for signature: >>> full(Tuple(Literal[int](3), Literal[int](5), Literal[int](10)), array(int64, 3d, A))

I was trying to combine several 1-d arrays into a 2-d array, and then expand it into a 3-d array of the specified shape, and I ran into this problem. The program works fine without the njit decorator.

This problem can be reproduced by the following code:

import numpy as np
import numba as nb


@nb.njit
def new_func():
    a = np.arange(5)
    b = a + 1
    c = b + 1
    arr = np.stack((a, b, c), axis=0)
    print(arr)
    tiled = np.full((3, 5, 10), arr[:, :, np.newaxis])
    print(tiled.shape)


if __name__ == "__main__":
    new_func()

@Akiba275 ,

It seems that Numba’s implementation of numpy.full doesn’t support using arrays as the fill_value argument. There’s an open feature request for this on the GitHub repository.

1 Like