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

UniformScaling: hcat vcat and hvcat with matrices of zero size #29456

Closed
mfalt opened this issue Oct 1, 2018 · 1 comment
Closed

UniformScaling: hcat vcat and hvcat with matrices of zero size #29456

mfalt opened this issue Oct 1, 2018 · 1 comment

Comments

@mfalt
Copy link
Contributor

mfalt commented Oct 1, 2018

Concatenating a UniformScaling with matrix with zero sizes throws error

using LinearAlgebra
A = randn(0,2)
[A I]
ERROR: ArgumentError: hcat of only UniformScaling objects cannot determine the matrix size
B = randn(2,0)
[B; I]
ERROR: ArgumentError: vcat of only UniformScaling objects cannot determine the matrix size
[A I; I I]
ERROR: ArgumentError: sizes of UniformScalings could not be inferred

I would argue that this is a bug and not only a missing implementation since the error message indicates for example hcat of only UniformScaling when this is not the case.

The problem is that 0 is used in cat/hcat/hvcat to indicate unknown sizes. PR: #29457

@fredrikekre
Copy link
Member

#29457

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

2 participants