I have two matrices A,B both of shape 150000 X 150000
I want to divide each element of A with each element of B, element wise.
The way I currently do it is -
res=A/B
I do get the output for small matrices, but for large matrices as mine. The process gets killed. Any suggestions on how to do this efficiently ?
sample data
A =
[
[2.2,3.3,4.4]
[2.2,3.3,4.4]
[2.2,3.3,4.4]]
B=
[
[1,3.3,4.4]
[2.2,1,4.4]
[2.2,3.3,1]]
res =
[
[2.2,1,1]
[1,3.3,1]
[1,1,4.4]]
This is a 3 X 3 matrix, I'm working with 150000 X 150000 matrix
question from:
https://stackoverflow.com/questions/65601310/how-to-divide-two-large-numpy-matrix-elemtwise-without-getting-killed 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…