def arr_base10toN(anum10, aradix, *args):
new_num_arr = array(())<EOL>current = anum10<EOL>while current != <NUM_LIT:0>:<EOL><INDENT>remainder = current % aradix<EOL>new_num_arr = r_[remainder, new_num_arr]<EOL>current = current / aradix<EOL><DEDENT>forcelength = new_num_arr.size<EOL>if len(args): forcelength = args[<NUM_LIT:0>]<EOL>while new_num_arr.size < forcelength:<EOL><INDENT>new_num_arr = r_[<NUM_LIT:0>, new_num_arr]<EOL><DEDENT>return new_num_arr<EOL>
ARGS
anum10            in      number in base 10
aradix            in      convert <anum10> to number in base
                          + <aradix>

OPTIONAL
forcelength       in      if nonzero, indicates the length
                          + of the return array. Useful if
                          + array needs to be zero padded.

DESC
Converts a scalar from base 10 to base radix. Return
an array.