Skip to content

targetofferbyPython 稀疏矩阵转置、丑数优化 #23

@zhu733756

Description

@zhu733756

def transTriple(triple):
m, n = shape(triple)
transMatrix = []
# sortedIndex = array([m[1] for m in triple]).argsort()
for i in range(m):
# tempArray = triple[sortedIndex[i]]
tempArray = triple[i]
transMatrix.append([tempArray[1], tempArray[0], tempArray[2]])
return transMatrix

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