iqm.benchmarks.compressive_gst.mgst.low_level_jit.local_basis

Contents

iqm.benchmarks.compressive_gst.mgst.low_level_jit.local_basis#

iqm.benchmarks.compressive_gst.mgst.low_level_jit.local_basis(x: int, b: int, length: int) ndarray#

Convert a base-10 integer to an integer in a specified base with a fixed number of digits.

This function takes an integer x in base-10 and converts it to base b. The result is returned as an array of length length with leading zeros.

Parameters:
  • x (int) – The input number in base-10 to be converted.

  • b (int) – The target base to convert the input number to.

  • length (int) – The number of output digits in the target base representation.

Returns:

A numpy array of integers representing the base-b digits of the converted number, with leading zeros if necessary. The length of the array is length.

Return type:

ndarray