xlnstorch.LNSTensor.get_internal_tensor

xlnstorch.LNSTensor.get_internal_tensor#

static LNSTensor.get_internal_tensor(fp_value, base)#

Converts an array-like floating point value to an LNSTensor and returns the internal packed representation for a given base.

Parameters:
  • fp_value (Any) – Array-like floating point value to convert to an LNSTensor. For possible types see the data parameter of lnstensor()

  • base (torch.Tensor) – Scalar tensor that holds the desired logarithm base.

Returns:

The internal packed representation of the LNSTensor for a requested floating point value and base.

Return type:

torch.Tensor