pymssa
pymssa copied to clipboard
def incremental_component_reconstruction -> numba LoweringError: Operands must be the same type, got (i64, i32)
I haven't found a workaround to make the incremental_component_reconstruction method work (in optimized package) with numba the issue and because of it it's quite slow to execute...
Has anyone encountered and found a solution for this issue: numba "LoweringError: Operands must be the same type, got (i64, i32)" which appears when initializing the "components" array "components = np.zeros((P, N, rank))" ?
Found the same issue on Windows with python 3.6.7 and numba==0.43.0 and numba==0.44.0. This issue doesnt happen in linux (ubuntu 16.04 ) and python 3.6.7.
I found the same issue on Windows 10 with python 3.7.3 and numba 0.45.1
This problem is from numba, not pymssa library. In fact, I managed to solve the error with these 2 steps:
- Find and open the optimized.py source code.
- Once opened, go to line 226: components = np.zeros((P, N, rank)). You must force the P, N and rank variables to be int64. Hence, you can modify this line of code as follows: components = np.zeros((np.int64(P), np.int64(N), np.int64(rank))).
This modification worked for me. No more errors obtained. Hope you can also solve it.