Home > other >  Numpy array operation optimization, multi-dimensional array invalid values multiplication
Numpy array operation optimization, multi-dimensional array invalid values multiplication

Time:11-18

Problem description:

There are two ndarray: x and y, and shape are: np. The shape (x)=(400, 500, 100, 200), np. Shape (y)=(100, 200)

Which contains a large number of x value is 0, y all values in the effective, if want to calculate x * y, how can improve operational efficiency, please?

CodePudding user response:

X with a combination, calculation of artificial intervention, reoccupy numpy block of the matrix
  • Related