Skip to content

mapping a matrix with matrices #3658

@dvd101x

Description

@dvd101x

Currently when mapping a function that returns a matrix. The result is a matrix of matrices.

math.matrix([1]).map( a => math.matrix([a]))
// DenseMatrix [DenseMatrix [1]]

Previously it returned a singe matrix. The change was introduced in v13.2.0 at in an attempt to increase performance #3256

This is the issue found at #3654.

The fix is simple, but probably will affect performance, and if the matrix function returns matrices of different sizes it will fail.

I can work in the fix, just please validate if this is an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions