You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method IndexMap.to_idxs(...) is meant as a shortcut if you want to convert an iterable of ids to the corresponding idx. In some cases one might want to input an numpy.array or a torch.Tensor with a specific shape. Currently we only allow conversions for one dimensional iterable objects but it would be great if you could input any shape and the output has the same shape and potentially also type. For the other direction (i.e. to_ids(....)) it would also make sense.
Example for the desired behaviour:
The method
IndexMap.to_idxs(...)
is meant as a shortcut if you want to convert an iterable of ids to the corresponding idx. In some cases one might want to input annumpy.array
or atorch.Tensor
with a specific shape. Currently we only allow conversions for one dimensional iterable objects but it would be great if you could input any shape and the output has the sameshape
and potentially alsotype
. For the other direction (i.e.to_ids(....)
) it would also make sense.Example for the desired behaviour:
The text was updated successfully, but these errors were encountered: