NumCpp  2.7.0
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:
51  template<typename dtype>
52  dtype uniform(dtype inLow, dtype inHigh)
53  {
54  STATIC_ASSERT_FLOAT(dtype);
55 
56  return randFloat(inLow, inHigh);
57  }
58 
59  //============================================================================
60  // Method Description:
73  template<typename dtype>
74  NdArray<dtype> uniform(const Shape& inShape, dtype inLow, dtype inHigh)
75  {
76  STATIC_ASSERT_FLOAT(dtype);
77 
78  return randFloat(inShape, inLow, inHigh);
79  }
80  } // namespace random
81 } // 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:59
dtype uniform(dtype inLow, dtype inHigh)
Definition: uniform.hpp:52
Definition: Coordinate.hpp:45