MCPcopy
hub / github.com/hpcaitech/Open-Sora / write

Function write

tools/frame_interpolation/utils/utils.py:119–135  ·  view source on GitHub ↗
(file, data)

Source from the content-addressed store, hash-verified

117
118
119def write(file, data):
120 if file.endswith(".float3"):
121 return writeFloat(file, data)
122 elif file.endswith(".flo"):
123 return writeFlow(file, data)
124 elif file.endswith(".ppm"):
125 return writeImage(file, data)
126 elif file.endswith(".pgm"):
127 return writeImage(file, data)
128 elif file.endswith(".png"):
129 return writeImage(file, data)
130 elif file.endswith(".jpg"):
131 return writeImage(file, data)
132 elif file.endswith(".pfm"):
133 return writePFM(file, data)
134 else:
135 raise Exception("don't know how to write %s" % file)
136
137
138def readPFM(file):

Callers

nothing calls this directly

Calls 4

writeFloatFunction · 0.85
writeFlowFunction · 0.85
writeImageFunction · 0.85
writePFMFunction · 0.85

Tested by

no test coverage detected