NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
asarray.hpp File Reference
#include <array>
#include <deque>
#include <forward_list>
#include <initializer_list>
#include <iterator>
#include <list>
#include <set>
#include <type_traits>
#include <vector>
#include "NumCpp/Core/Enums.hpp"
#include "NumCpp/Core/Internal/TypeTraits.hpp"
#include "NumCpp/NdArray.hpp"

Go to the source code of this file.

Namespaces

namespace  nc
 

Functions

template<typename dtype >
NdArray< dtype > nc::asarray (const dtype *iterBegin, const dtype *iterEnd)
 
template<typename dtype >
NdArray< dtype > nc::asarray (const dtype *ptr, uint32 numRows, uint32 numCols)
 
template<typename dtype >
NdArray< dtype > nc::asarray (const dtype *ptr, uint32 size)
 
template<typename dtype , std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0>
NdArray< dtype > nc::asarray (const std::deque< dtype > &inDeque)
 
template<typename dtype >
NdArray< dtype > nc::asarray (const std::deque< std::deque< dtype > > &inDeque)
 
template<typename dtype >
NdArray< dtype > nc::asarray (const std::list< dtype > &inList)
 
template<typename dtype , typename dtypeComp >
NdArray< dtype > nc::asarray (const std::set< dtype, dtypeComp > &inSet)
 
template<typename dtype >
NdArray< dtype > nc::asarray (const std::vector< std::vector< dtype > > &inVector)
 
template<typename dtype , typename UIntType , std::enable_if_t< std::is_integral_v< UIntType > &&!std::is_same_v< UIntType, bool >, int > = 0>
NdArray< dtype > nc::asarray (dtype *ptr, UIntType size, PointerPolicy pointerPolicy=PointerPolicy::COPY) noexcept
 
template<typename dtype , typename UIntType1 , typename UIntType2 , std::enable_if_t< std::is_integral_v< UIntType1 > &&!std::is_same_v< UIntType1, bool >, int > = 0, std::enable_if_t< std::is_integral_v< UIntType2 > &&!std::is_same_v< UIntType2, bool >, int > = 0>
NdArray< dtype > nc::asarray (dtype *ptr, UIntType1 numRows, UIntType2 numCols, PointerPolicy pointerPolicy=PointerPolicy::COPY) noexcept
 
template<typename Iterator >
auto nc::asarray (Iterator iterBegin, Iterator iterEnd)
 
template<typename dtype , size_t ArraySize, std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0>
NdArray< dtype > nc::asarray (std::array< dtype, ArraySize > &inArray, PointerPolicy pointerPolicy=PointerPolicy::COPY)
 
template<typename dtype , size_t Dim0Size, size_t Dim1Size>
NdArray< dtype > nc::asarray (std::array< std::array< dtype, Dim1Size >, Dim0Size > &inArray, PointerPolicy pointerPolicy=PointerPolicy::COPY)
 
template<typename dtype , std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0>
NdArray< dtype > nc::asarray (std::initializer_list< dtype > inList)
 
template<typename dtype >
NdArray< dtype > nc::asarray (std::initializer_list< std::initializer_list< dtype > > inList)
 
template<typename dtype , std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0>
NdArray< dtype > nc::asarray (std::vector< dtype > &inVector, PointerPolicy pointerPolicy=PointerPolicy::COPY)
 
template<typename dtype , size_t Dim1Size>
NdArray< dtype > nc::asarray (std::vector< std::array< dtype, Dim1Size > > &inVector, PointerPolicy pointerPolicy=PointerPolicy::COPY)
 

Detailed Description

Author
David Pilger dpilg.nosp@m.er26.nosp@m.@gmai.nosp@m.l.co.nosp@m.m GitHub Repository

License Copyright 2018-2023 David Pilger

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description Functions for working with NdArrays