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

Mat(Mat) construction #65

Closed
schmrlng opened this issue Jan 13, 2016 · 2 comments
Closed

Mat(Mat) construction #65

schmrlng opened this issue Jan 13, 2016 · 2 comments

Comments

@schmrlng
Copy link

julia> using FixedSizeArrays

julia> a = Mat((1,2), (3,4))
FixedSizeArrays.Mat{2,2,Int64}(
    1 3
    2 4
)

julia> Mat(a)
FixedSizeArrays.Mat{4,1,Int64}(
    1
    1
    1
    1
)

I think this last call should return a copy of a. I suspect that return :( $FSA($a_expr...) ) here should instead look something like return :( $FSA($a_expr.(1)...) ), but making that change introduces other test errors that are tricky to track down through the constructor magic. A likely related issue:

julia> Mat([1,2,3,4])  # Array{Float64,1}
FixedSizeArrays.Mat{4,1,Int64}(
    1
    1
    1
    1
)

julia> Mat([1,2,3,4]'')  # Array{Float64,2}
FixedSizeArrays.Mat{4,1,Int64}(
    1
    2
    3
    4
)
@SimonDanisch
Copy link
Owner

Okay, that's definitely a bug... Constructor magic is really just an euphomism for bad code :D
I'll look into it...

SimonDanisch added a commit that referenced this issue Jan 20, 2016
SimonDanisch added a commit that referenced this issue Jan 20, 2016
SimonDanisch added a commit that referenced this issue Jan 20, 2016
@SimonDanisch
Copy link
Owner

should be fixed by #67

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