NumCpp  2.4.0
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:
49  template<typename dtype>
50  dtype newbyteorder(dtype inValue, Endian inEndianess)
51  {
52  NdArray<dtype> valueArray = { inValue };
53  return valueArray.newbyteorder(inEndianess).item();
54  }
55 
56  //============================================================================
57  // Method Description:
70  template<typename dtype>
71  NdArray<dtype> newbyteorder(const NdArray<dtype>& inArray, Endian inEndianess)
72  {
73  return inArray.newbyteorder(inEndianess);
74  }
75 } // namespace nc
nc::NdArray::item
value_type item() const
Definition: NdArrayCore.hpp:2975
nc::NdArray< dtype >
NdArray.hpp
nc::NdArray::newbyteorder
NdArray< dtype > newbyteorder(Endian inEndianess) const
Definition: NdArrayCore.hpp:3244
nc::Endian
Endian
Enum for endianess.
Definition: Types.hpp:50
nc
Definition: Coordinate.hpp:44
nc::newbyteorder
dtype newbyteorder(dtype inValue, Endian inEndianess)
Definition: newbyteorder.hpp:50
Types.hpp