(a, newshape, order='C')
return utils.tensor_to_ndarray(r)
order argument can only b 'C' or 'F'.
order argument can only b 'C' or 'F'.
order argument can only b C or F .
def reshape(a, newshape, order='C'):
  """order argument can only b 'C' or 'F'."""
  if order not in {'C', 'F'}:
    raise ValueError('Unsupported order argument {}'.format(order))

  a = asarray(a)
  if isinstance(newshape, arrays_lib.ndarray):
    newshape = newshape.data
  if isinstance(newshape, int):
    newshape = [newshape]

  if order == 'F':
    r = tf.transpose(tf.reshape(tf.transpose(a.data), newshape[::-1]))
  else:
    r = tf.reshape(a.data, newshape)

  return utils.tensor_to_ndarray(r)
def reshape ( a , newshape , order = 'C' ) : if order not in { 'C' , 'F' } : raise ValueError ( 'Unsupported order argument {}' . format ( order ) ) a = asarray ( a ) if isinstance ( newshape , arrays_lib . ndarray ) : newshape = newshape . data if isinstance ( newshape , int ) : newshape = [ newshape ] if order == 'F' : r = tf . transpose ( tf . reshape ( tf . transpose ( a . data ) , newshape [ : : - 1 ] ) ) else : r = tf . reshape ( a . data , newshape ) return utils . tensor_to_ndarray ( r )