Skip to content

np.mean(DenseMatrix, axis=n) gives a malformed DenseMatrix #5

Description

@rspeer

np.mean() of a DenseMatrix, across one axis, should return a DenseVector of the means. Instead, it returns a DenseMatrix wrapping a vector, which is just all kinds of bad.

Fixing this will require either (a) digging into the subclass magic, or (b) making DenseMatrix and DenseVector actually the same class.

Workaround: run np.asarray() on it first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions