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

Operations with mismatched dimensions #118

Closed
lbilli opened this issue Jul 7, 2019 · 3 comments
Closed

Operations with mismatched dimensions #118

lbilli opened this issue Jul 7, 2019 · 3 comments

Comments

@lbilli
Copy link

lbilli commented Jul 7, 2019

I was surprised to see that these operations succeed even though dimensions don't match:

julia> using BandedMatrices

julia> m = BandedMatrix(Eye(3), (0,0))
3×3 BandedMatrix{Float64,Array{Float64,2},Base.OneTo{Int64}}:
 1.0        
     1.0    
         1.0

julia> m * [1,2]
3-element Array{Float64,1}:
 1.0
 2.0
 0.0

julia> m * [1, 2, 3, 4]
3-element Array{Float64,1}:
 1.0
 2.0
 3.0

julia> m \ [1, 2]
3-element Array{Float64,1}:
 1.0                  
 2.0                  
 6.92307382816255e-310

Needless to say, if a regular Matrix is used instead, DimensionMismatch exceptions are thrown.

Is this the expected behavior?

@dlfivefifty
Copy link
Member

This is definitely not expected

@lbilli lbilli changed the title Operations with mismatched dimansions Operations with mismatched dimensions Jul 7, 2019
@lbilli
Copy link
Author

lbilli commented Aug 21, 2019

Fixed in v0.10.0

@lbilli lbilli closed this as completed Aug 21, 2019
@dlfivefifty
Copy link
Member

I'm going to reopen this to remember to add tests.

@dlfivefifty dlfivefifty reopened this Aug 21, 2019
dlfivefifty added a commit that referenced this issue Aug 22, 2019
* Support Julia v1.3

* Skip Float16 det test, add tests for #118

* v0.10.1, add missing similar

* Increase coverage

* Fix tests
dlfivefifty added a commit that referenced this issue Sep 3, 2019
* Support Julia v1.3

* Skip Float16 det test, add tests for #118

* v0.10.1, add missing similar

* Start to Generalize QR to support subviews

* FillArrays 0.7

* updates for latest LazyArrays

* Add special copy for BandedStyle broadcasting, use lazy_getindex for more types

* Fix materialize!, BandedMatrices 0.11
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