-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
featureNew feature or requestNew feature or requestgood first issueGood for first-time contributorsGood for first-time contributors
Description
Sometimes, the simulators may return larger arrays than we want to use in our networks, so it would be great to have some subsetting adapter transforms.
We need:
- Subsetting within an axis (taking only some elements) while keeping the number of axes the same. This is essentially the
np.takefunctionality so we might want to call this transformtake. In contrast tonp.take, I would makeaxisa mandatory arguments or default it to the last axis. Example:adapter.take("x", 1:3, axis = -1) - Subsetting using a random set of indices (of user-specified size) within an axis. We might call this
subsample. Internally it would calltakeafter sampling the indices. Example:adapter.subsample("x", size = 3, axis = -1) - Removing an axis of length one. Following numpy, I would call this transform
squeeze: Example:adapter.squeeze("x", axis = 1)
han-ol
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or requestgood first issueGood for first-time contributorsGood for first-time contributors