MCPcopy Create free account
hub / github.com/AkaliKong/MiniOneRec / extract_axis_1

Function extract_axis_1

utility.py:10–15  ·  view source on GitHub ↗
(data, indices)

Source from the content-addressed store, hash-verified

8
9
10def extract_axis_1(data, indices):
11 res = []
12 for i in range(data.shape[0]):
13 res.append(data[i, indices[i], :])
14 res = torch.stack(res, dim=0).unsqueeze(1)
15 return res
16
17
18def to_pickled_df(data_directory, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected