def nextpow2(value):
if value >= <NUM_LIT:1>:<EOL><INDENT>return <NUM_LIT:2>**np.ceil(np.log2(value)).astype(int)<EOL><DEDENT>elif value > <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:1><EOL><DEDENT>elif value == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>
Compute the nearest power of two greater or equal to the input value