MCPcopy Create free account
hub / github.com/CSAILVision/IBD / onehot

Method onehot

loader/data_loader.py:139–151  ·  view source on GitHub ↗

Expands an array of integers in one-hot encoding by adding a new last dimension, leaving zeros everywhere except for the nth dimension, where the original array contained the integer n. The minlength parameter is used to indcate the minimum size of the new dimension

(self, arr, minlength=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected