NumCpp  2.10.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
newbyteorder.hpp
Go to the documentation of this file.
1 #pragma once
29 
30 #include "NumCpp/Core/Types.hpp"
31 #include "NumCpp/NdArray.hpp"
32 
33 namespace nc
34 {
35  //============================================================================
36  // Method Description:
48  template<typename dtype>
49  dtype newbyteorder(dtype inValue, Endian inEndianess)
50  {
51  NdArray<dtype> valueArray = { inValue };
52  return valueArray.newbyteorder(inEndianess).item();
53  }
54 
55  //============================================================================
56  // Method Description:
68  template<typename dtype>
69  NdArray<dtype> newbyteorder(const NdArray<dtype>& inArray, Endian inEndianess)
70  {
71  return inArray.newbyteorder(inEndianess);
72  }
73 } // namespace nc
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:138
self_type newbyteorder(Endian inEndianess) const
Definition: NdArrayCore.hpp:3171
value_type item() const
Definition: NdArrayCore.hpp:2945
Definition: Coordinate.hpp:45
dtype newbyteorder(dtype inValue, Endian inEndianess)
Definition: newbyteorder.hpp:49
Endian
Enum for endianess.
Definition: Types.hpp:56