added sparseDoubleMatrix2D input handling