Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when comparing 2 empty matrices #31

Open
alexott opened this issue Jun 5, 2013 · 0 comments
Open

NPE when comparing 2 empty matrices #31

alexott opened this issue Jun 5, 2013 · 0 comments

Comments

@alexott
Copy link

alexott commented Jun 5, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant