Create a random array sampled from uniform distribution.  
More...
|  | 
| AFAPI array | randu (const dim4 &dims, const dtype ty=f32) | 
|  | 
| AFAPI array | randu (const dim_t d0, const dtype ty=f32) | 
|  | 
| AFAPI array | randu (const dim_t d0, const dim_t d1, const dtype ty=f32) | 
|  | 
| AFAPI array | randu (const dim_t d0, const dim_t d1, const dim_t d2, const dtype ty=f32) | 
|  | 
| AFAPI array | randu (const dim_t d0, const dim_t d1, const dim_t d2, const dim_t d3, const dtype ty=f32) | 
|  | 
| AFAPI af_err | af_randu (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type) | 
|  | 
Create a random array sampled from uniform distribution. 
The data is uniformly distributed between [0, 1]
- Parameters
- 
  
    | [out] | out | is the generated array |  | [in] | ndims | is size of dimension array dims |  | [in] | dims | is the array containing sizes of the dimension |  | [in] | type | is the type of array to generate |  
 
 
 
- Parameters
- 
  
    | [in] | dims | is the dimensions of the array to be generated |  | [in] | ty | is the type of the array |  
 
- Returns
- array of size dims
- Examples: 
- bagging.cpp, cholesky.cpp, convolve.cpp, conway.cpp, conway_pretty.cpp, deep_belief_net.cpp, fft.cpp, filters.cpp, helloworld.cpp, histogram.cpp, kmeans.cpp, lu.cpp, neural_network.cpp, pi.cpp, qr.cpp, rbm.cpp, susan.cpp, and vectorize.cpp.
 
 
- Parameters
- 
  
    | [in] | d0 | is the size of the first dimension |  | [in] | ty | is the type of the array |  
 
- Returns
- array of size d0
 
 
- Parameters
- 
  
    | [in] | d0 | is the size of the first dimension |  | [in] | d1 | is the size of the second dimension |  | [in] | ty | is the type of the array |  
 
- Returns
- array of size d0xd1
 
 
- Parameters
- 
  
    | [in] | d0 | is the size of the first dimension |  | [in] | d1 | is the size of the second dimension |  | [in] | d2 | is the size of the third dimension |  | [in] | ty | is the type of the array |  
 
- Returns
- array of size d0xd1xd2
 
 
- Parameters
- 
  
    | [in] | d0 | is the size of the first dimension |  | [in] | d1 | is the size of the second dimension |  | [in] | d2 | is the size of the third dimension |  | [in] | d3 | is the size of the fourth dimension |  | [in] | ty | is the type of the array |  
 
- Returns
- array of size d0xd1xd2xd3