NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
newbyteorder.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include "NumCpp/Core/Types.hpp"
31#include "NumCpp/NdArray.hpp"
32
33namespace 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:139
self_type newbyteorder(Endian inEndianess) const
Definition: NdArrayCore.hpp:3248
value_type item() const
Definition: NdArrayCore.hpp:3022
Definition: Cartesian.hpp:40
dtype newbyteorder(dtype inValue, Endian inEndianess)
Definition: newbyteorder.hpp:49
Endian
Enum for endianess.
Definition: Enums.hpp:46