NumCpp  2.5.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
uniform.hpp
Go to the documentation of this file.
1 #pragma once
29 
33 
34 namespace nc
35 {
36  namespace random
37  {
38  //============================================================================
39  // Method Description:
52  template<typename dtype>
53  dtype uniform(dtype inLow, dtype inHigh)
54  {
55  STATIC_ASSERT_FLOAT(dtype);
56 
57  return randFloat(inLow, inHigh);
58  }
59 
60  //============================================================================
61  // Method Description:
75  template<typename dtype>
76  NdArray<dtype> uniform(const Shape& inShape, dtype inLow, dtype inHigh)
77  {
78  STATIC_ASSERT_FLOAT(dtype);
79 
80  return randFloat(inShape, inLow, inHigh);
81  }
82  } // namespace random
83 } // namespace nc
#define STATIC_ASSERT_FLOAT(dtype)
Definition: StaticAsserts.hpp:43
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype randFloat(dtype inLow, dtype inHigh=0.0)
Definition: randFloat.hpp:60
dtype uniform(dtype inLow, dtype inHigh)
Definition: uniform.hpp:53
Definition: Coordinate.hpp:45