def ind2sub(array_shape, ind):
    rows = (ind.astype('int') / array_shape[1])
    cols = (ind.astype('int') % array_shape[1])  # or numpy.mod(ind.astype('int'), array_shape[1])
    return rows, cols
This is the function called when the apply or create button is clicked
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/dev/sct_detect_spinalcord/sct_detect_spinalcord.py/ind2sub--crossover with--dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/amTools/rigging/insertParents.py/doOptions