Skip to content

TypeError: bad operand type for unary -: 'list' #27

Open
@jxrloveyou

Description

@jxrloveyou

Hello, there is an error at '-x' in the following code, is it a problem with the numpy version?

    import numpy as np
def compute_metrics(x):
    sx = np.sort(-x, axis=1)
    d = np.diag(-x)

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