flasc.analysis.energy_ratio_input.generate_block_list

flasc.analysis.energy_ratio_input.generate_block_list#

flasc.analysis.energy_ratio_input.generate_block_list(N: int, num_blocks: int = 10)[source]#

Generate an np.array of length N where each element is an integer between 0 and num_blocks-1.

Generate an np.array of length N where each element is an integer between 0 and num_blocks-1 with each value repeating N/num_blocks times.

Parameters:
  • N (int) -- Length of the array to generate

  • num_blocks (int) -- Number of blocks to generate. Defaults to 10.

Returns:

An array of length N with values between 0 and num_blocks-1

Return type:

np.array