wilson-labs / cola

Compositional Linear Algebra
Apache License 2.0
401 stars 26 forks source link

[Bug] Concatenated Op axis aren't correct #82

Open adam-hartshorne opened 9 months ago

adam-hartshorne commented 9 months ago

I think there is a bug in the Concatenated Op, where the wrong axes are being processed.

e.g. A of size (100,2), B of size (100,1)

in Cola, if you use the Concatenated op via

C = cola.ops.Concatenated(A, B, axis=0)

C will be of size (200,2)...which isn't correct.

and

C = cola.ops.Concatenated(A, B, axis=1)

will give an Assertion Error: Trying to concatenate matrices of different sizes [(100, 2), (100, 1)]

mfinzi commented 8 months ago

Sorry about the late response! Good catch, I think the Concatenated op may not be as well tested as the other matrices. After the ICML deadline I will have a look into this