Skip to content

Commit

Permalink
CHOLMOD: horzcat, check if A and B dtype mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Nov 29, 2023
1 parent e261422 commit 41166ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CHOLMOD/MatrixOps/cholmod_horzcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cholmod_sparse *CHOLMOD(horzcat) // return C = [A B]
ERROR (CHOLMOD_INVALID, "A and B must have same # rows") ;
return (NULL) ;
}
if (mode != 0 && (A->xtype != B->xtype || A->dtype != A->dtype))
if (mode != 0 && (A->xtype != B->xtype || A->dtype != B->dtype))
{
// A and B must have the same xtype and dtype if mode is 0
ERROR (CHOLMOD_INVALID, "A and B must have same xtype and dtype") ;
Expand Down

2 comments on commit 41166ce

@mmuetzel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same change should probably also be done for the corresponding condition in cholmod_vertcat.c.

@DrTimothyAldenDavis
Copy link
Owner Author

@DrTimothyAldenDavis DrTimothyAldenDavis commented on 41166ce Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch. I just fixed it in a followup push: da9f318

Please sign in to comment.