Explicit nonzero handling in sparse matrix operations
Hello everyone, I'd like to add explicit zero handling into the scipy sparse matrix operations. It's currently part of pull request #11899. The functionality allows a user to selectively consider only explicit nonzero values in the sparse min, max, argmin, and argmax functions. Previous to this change, the programmer will have needed to mathematically manipulate the sparse matrix so that these functions gave the correct result when considering matrices that contain zero values. By passing in the explicit keyword, these functions are now able to consider only nonzero values within the matrix. The change defaults to the existing functionality and only activates these changes if the user activates the input keyword. This issue exists in several of my existing programs. As a benchmark, this implementation improves performance between 1.15x and 1.35x compared to manipulating the sparse matrix to identify nonzero values. Does anyone have any thoughts on this functionality? Drew Allan Loney, PhD PE Water Resources Engineering and Management Technical Services Center Bureau of Reclamation (303)445-2541
participants (1)
-
Loney, Drew A