Skip to content

Allow dependent variables to handle arithmetic operations  #91

@mccarthy677

Description

@mccarthy677

Describe the reason for the request

Dependent variables cannot currently handle arithmetic, like multiplication:


test = cp.as_dependent_variable(np.array([1,2,3,4,5]))
print(test*2)
TypeError: unsupported operand type(s) for *: 'DependentVariable' and 'int'

this functionality could be useful in some circumstances

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