Skip to content

var, std memory consumption #13199

Open
Open
@0x0L

Description

@0x0L

Hello,

It looks like numpy is allocating a whole new array to compute the second moment as seen in _methods.py.

This could be easily improved by adding a low level function to compute the sum of squares (or any power for fast nth moment computation) along a dimension and expanding the square in _var.

It does not look too complicated but I'm really unsure on how to do the low level function (loops.c.src ?)

This should help with scikit-learn/scikit-learn#5651

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions