Skip to content

Dot does not check sizes of matrices  #549

@antoine-levitt

Description

@antoine-levitt

See discussion at https://discourse.julialang.org/t/efficient-trace-of-product-of-matrices/13313/12

Mwe :

julia> A = rand(4,4);

julia> B = rand(8,2);

julia> dot(A,B)
3.8210283956714974

It is debatable what should be done here, but I think the current behavior is surprising, and can easily be gotten with vec if needed. It seems more prudent to error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions