def _atleast_nd_transform(min_ndim, axes):
 assert (min_ndim == len(axes))
 def transform(context, builder, arr, arrty, retty):
  for i in range(min_ndim):
   ndim = (i + 1)
   if (arrty.ndim < ndim):
    axis = cgutils.intp_t(axes[i])
    newarrty = arrty.copy(ndim=(arrty.ndim + 1))
    arr = expand_dims(context, builder, typing.signature(newarrty, arrty), (arr,), axis)
    arrty = newarrty
  return arr
 return transform

def _atleast_nd_transform ( min_ndim , axes ) : assert ( min_ndim == len ( axes ) ) def transform ( context , builder , arr , arrty , retty ) : for i in range ( min_ndim ) : ndim = ( i + 1 ) if ( arrty . ndim < ndim ) : axis = cgutils . intp_t ( axes [ i ] ) newarrty = arrty . copy ( ndim = ( arrty . ndim + 1 ) ) arr = expand_dims ( context , builder , typing . signature ( newarrty , arrty ) , ( arr , ) , axis ) arrty = newarrty return arr return transform
return a callback successively inserting 1-sized dimensions at the following axes .