Modify the input dimensions without changing the data order.  
More...
 | 
| AFAPI array  | moddims (const array &in, const unsigned ndims, const dim_t *const dims) | 
|   | 
| AFAPI array  | moddims (const array &in, const dim4 &dims) | 
|   | 
| AFAPI array  | moddims (const array &in, const dim_t d0, const dim_t d1=1, const dim_t d2=1, const dim_t d3=1) | 
|   | 
| AFAPI af_err  | af_moddims (af_array *out, const af_array in, const unsigned ndims, const dim_t *const dims) | 
|   | 
Modify the input dimensions without changing the data order. 
Simply modifies the metadata. This is a noop.
- Parameters
 - 
  
    | [out] | out | is the modded array  | 
    | [in] | in | is the input array  | 
    | [in] | ndims | is the number of dimensions  | 
    | [in] | dims | is the array containing the new dimensions  | 
  
   
 
 
      
        
          | AFAPI array af::moddims  | 
          ( | 
          const array &  | 
          in,  | 
        
        
           | 
           | 
          const unsigned  | 
          ndims,  | 
        
        
           | 
           | 
          const dim_t *const  | 
          dims  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Parameters
 - 
  
    | [in] | in | is the input array  | 
    | [in] | ndims | is the number of dimensions  | 
    | [in] | dims | is the array containing the new dimensions  | 
  
   
- Returns
 - the modded output 
 
- Examples: 
 - getting_started/vectorize.cpp, image_processing/brain_segmentation.cpp, image_processing/filters.cpp, machine_learning/bagging.cpp, machine_learning/deep_belief_net.cpp, machine_learning/kmeans.cpp, machine_learning/knn.cpp, machine_learning/logistic_regression.cpp, machine_learning/naive_bayes.cpp, machine_learning/neural_network.cpp, machine_learning/perceptron.cpp, machine_learning/rbm.cpp, machine_learning/softmax_regression.cpp, and pde/swe.cpp.
 
 
 
- Parameters
 - 
  
    | [in] | in | is the input array  | 
    | [in] | dims | is the new dimensions  | 
  
   
- Returns
 - the modded output 
 
 
 
- Parameters
 - 
  
    | [in] | in | is the input array  | 
    | [in] | d0 | specifies the new size of the first dimension  | 
    | [in] | d1 | specifies the new size of the second dimension  | 
    | [in] | d2 | specifies the new size of the third dimension  | 
    | [in] | d3 | specifies the new size of the fourth dimension  | 
  
   
- Returns
 - the modded array