Skip to content

feat: support using reduction as a subexpression #15

@tongzhou80

Description

@tongzhou80

A simple solution for now to detect if the value of the assignment is a binary op, and if left or right is a reduction call, like np.sum or np.max etc. If so insert a new assignment and replace the old call with a new temp var.

a = a - np.sum(b)

would become

__tmp_var = np.sum(b)
a = a - __tmp_var

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