Skip to content

Tag: numba

Create np.array filled with zero arrays

I’m trying to initialize an “empty” array with each elements containing t_list a 8×8 np.zeros array : t_list = np.zeros((8,8), dtype=np.float32) I would now want to have a np.array with multiple t_list at each indexes: result = np.array((t_list, t_list, …., tlist)) I would like to…

Why does this code fail to compile with Numba?

I have a sample code that illustrates my issue. If you run: It will fail with: argsort is supposed to argsort on the last axis. Essentially it should give me: I thought copying the arr2 array (with copy()) could solve as it would make the array contiguous in memory (instead of a view), but it fails with the s…

Using typed dictionaries in ahead of time compilation in numba

I’m trying to use ahead of time compilation in numba on a function that takes a numba typed dictionary as its input. The file compiles without errors, but when I load the resulting module I get an error: An example function that produces the same error is: This function will be called by another functio…