Skip to content

NPE when comparing 2 empty matrices #31

@alexott

Description

@alexott

As part of investigation for incanter's bug #149 I've found that comparison of 2 empty matrices causes NPE in the jBlas:

 user> (= (matrix []) (matrix []))
 NullPointerException   org.jblas.JavaBlas.rcopy (JavaBlas.java:80)

Following change in Matrix deftype in clatrix fixes comparison of matrices, but it still fails for comparison of empty vector and empty matrix, etc.

 (matrix? that) (if (and (= (count this) 0) (= (count that) 0))
                  true
                  (.equals (.me this) (.me that)))

I'm not sure - this is jBlas's issue or clatrix's

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions