![]() |
NumCpp
2.7.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Holds 1D and 2D arrays, the main work horse of the NumCpp library. More...
#include <NdArrayCore.hpp>
Public Types | |
using | allocator_type = Allocator |
using | column_iterator = NdArrayColumnIterator< dtype, size_type, pointer, difference_type > |
using | const_column_iterator = NdArrayConstColumnIterator< dtype, size_type, const_pointer, difference_type > |
using | const_iterator = NdArrayConstIterator< dtype, const_pointer, difference_type > |
using | const_pointer = typename AllocTraits::const_pointer |
using | const_reference = const dtype & |
using | const_reverse_column_iterator = std::reverse_iterator< const_column_iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | difference_type = typename AllocTraits::difference_type |
using | iterator = NdArrayIterator< dtype, pointer, difference_type > |
using | pointer = typename AllocTraits::pointer |
using | reference = dtype & |
using | reverse_column_iterator = std::reverse_iterator< column_iterator > |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | size_type = uint32 |
using | value_type = dtype |
Public Member Functions | |
NdArray ()=default | |
NdArray (const NdArray< dtype > &inOtherArray) | |
NdArray (const Shape &inShape) | |
template<std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0> | |
NdArray (const std::deque< dtype > &inDeque) | |
NdArray (const std::deque< std::deque< dtype >> &in2dDeque) | |
NdArray (const std::initializer_list< std::initializer_list< dtype > > &inList) | |
NdArray (const std::list< dtype > &inList) | |
NdArray (const std::vector< std::vector< dtype >> &in2dVector) | |
NdArray (const_pointer inPtr, size_type size) | |
template<typename UIntType1 , typename UIntType2 , std::enable_if_t<!is_same_v< UIntType1, bool >, int > = 0, std::enable_if_t<!is_same_v< UIntType2, bool >, int > = 0> | |
NdArray (const_pointer inPtr, UIntType1 numRows, UIntType2 numCols) | |
template<typename Iterator , std::enable_if_t< is_same_v< typename std::iterator_traits< Iterator >::value_type, dtype >, int > = 0> | |
NdArray (Iterator inFirst, Iterator inLast) | |
NdArray (NdArray< dtype > &&inOtherArray) noexcept | |
template<typename Bool , std::enable_if_t< is_same_v< Bool, bool >, int > = 0> | |
NdArray (pointer inPtr, size_type size, Bool takeOwnership) noexcept | |
template<typename Bool , std::enable_if_t< is_same_v< Bool, bool >, int > = 0> | |
NdArray (pointer inPtr, uint32 numRows, uint32 numCols, Bool takeOwnership) noexcept | |
NdArray (size_type inNumRows, size_type inNumCols) | |
NdArray (size_type inSquareSize) | |
template<size_t ArraySize, std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0> | |
NdArray (std::array< dtype, ArraySize > &inArray, bool copy=true) | |
template<size_t Dim0Size, size_t Dim1Size> | |
NdArray (std::array< std::array< dtype, Dim1Size >, Dim0Size > &in2dArray, bool copy=true) | |
NdArray (std::initializer_list< dtype > inList) | |
template<std::enable_if_t< is_valid_dtype_v< dtype >, int > = 0> | |
NdArray (std::vector< dtype > &inVector, bool copy=true) | |
template<size_t Dim1Size> | |
NdArray (std::vector< std::array< dtype, Dim1Size >> &in2dArray, bool copy=true) | |
~NdArray () noexcept | |
NdArray< bool > | all (Axis inAxis=Axis::NONE) const |
NdArray< bool > | any (Axis inAxis=Axis::NONE) const |
NdArray< uint32 > | argmax (Axis inAxis=Axis::NONE) const |
NdArray< uint32 > | argmin (Axis inAxis=Axis::NONE) const |
NdArray< uint32 > | argsort (Axis inAxis=Axis::NONE) const |
template<typename dtypeOut , typename dtype_ = dtype, enable_if_t< is_same_v< dtype_, dtype >, int > = 0, enable_if_t< is_arithmetic_v< dtype_ >, int > = 0, enable_if_t< is_arithmetic_v< dtypeOut >, int > = 0> | |
NdArray< dtypeOut > | astype () const |
template<typename dtypeOut , typename dtype_ = dtype, enable_if_t< is_same_v< dtype_, dtype >, int > = 0, enable_if_t< is_arithmetic_v< dtype_ >, int > = 0, enable_if_t< is_complex_v< dtypeOut >, int > = 0> | |
NdArray< dtypeOut > | astype () const |
template<typename dtypeOut , typename dtype_ = dtype, enable_if_t< is_same_v< dtype_, dtype >, int > = 0, enable_if_t< is_complex_v< dtype_ >, int > = 0, enable_if_t< is_complex_v< dtypeOut >, int > = 0> | |
NdArray< dtypeOut > | astype () const |
template<typename dtypeOut , typename dtype_ = dtype, enable_if_t< is_same_v< dtype_, dtype >, int > = 0, enable_if_t< is_complex_v< dtype_ >, int > = 0, enable_if_t< is_arithmetic_v< dtypeOut >, int > = 0> | |
NdArray< dtypeOut > | astype () const |
NdArray< dtype > | at (const NdArray< int32 > &rowIndices, const NdArray< int32 > &colIndices) const |
NdArray< dtype > | at (const Slice &inRowSlice, const Slice &inColSlice) const |
NdArray< dtype > | at (const Slice &inRowSlice, int32 inColIndex) const |
NdArray< dtype > | at (const Slice &inSlice) const |
reference | at (int32 inIndex) |
const_reference | at (int32 inIndex) const |
NdArray< dtype > | at (int32 inRowIndex, const Slice &inColSlice) const |
reference | at (int32 inRowIndex, int32 inColIndex) |
const_reference | at (int32 inRowIndex, int32 inColIndex) const |
const_reference | back () const noexcept |
reference | back () noexcept |
reference | back (size_type row) |
const_reference | back (size_type row) const |
const_iterator | begin () const noexcept |
iterator | begin () noexcept |
iterator | begin (size_type inRow) |
const_iterator | begin (size_type inRow) const |
NdArray< dtype > & | byteswap () noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cbegin (size_type inRow) const |
const_column_iterator | ccolbegin () const noexcept |
const_column_iterator | ccolbegin (size_type inCol) const |
const_column_iterator | ccolend () const noexcept |
const_column_iterator | ccolend (size_type inCol) const |
const_iterator | cend () const noexcept |
const_iterator | cend (size_type inRow) const |
NdArray< dtype > | clip (value_type inMin, value_type inMax) const |
const_column_iterator | colbegin () const noexcept |
column_iterator | colbegin () noexcept |
column_iterator | colbegin (size_type inCol) |
const_column_iterator | colbegin (size_type inCol) const |
const_column_iterator | colend () const noexcept |
column_iterator | colend () noexcept |
column_iterator | colend (size_type inCol) |
const_column_iterator | colend (size_type inCol) const |
NdArray< dtype > | column (uint32 inColumn) |
NdArray< bool > | contains (value_type inValue, Axis inAxis=Axis::NONE) const |
NdArray< dtype > | copy () const |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crbegin (size_type inRow) const |
const_reverse_column_iterator | crcolbegin () const noexcept |
const_reverse_column_iterator | crcolbegin (size_type inCol) const |
const_reverse_column_iterator | crcolend () const noexcept |
const_reverse_column_iterator | crcolend (size_type inCol) const |
const_reverse_iterator | crend () const noexcept |
const_reverse_iterator | crend (size_type inRow) const |
Slice | cSlice (int32 inStartIdx=0, uint32 inStepSize=1) const noexcept |
NdArray< dtype > | cumprod (Axis inAxis=Axis::NONE) const |
NdArray< dtype > | cumsum (Axis inAxis=Axis::NONE) const |
const_pointer | data () const noexcept |
pointer | data () noexcept |
pointer | dataRelease () noexcept |
NdArray< dtype > | diagonal (int32 inOffset=0, Axis inAxis=Axis::ROW) const |
NdArray< dtype > | dot (const NdArray< dtype > &inOtherArray) const |
void | dump (const std::string &inFilename) const |
const_iterator | end () const noexcept |
iterator | end () noexcept |
iterator | end (size_type inRow) |
const_iterator | end (size_type inRow) const |
Endian | endianess () const noexcept |
NdArray< dtype > & | fill (value_type inFillValue) noexcept |
NdArray< uint32 > | flatnonzero () const |
NdArray< dtype > | flatten () const |
const_reference | front () const noexcept |
reference | front () noexcept |
reference | front (size_type row) |
const_reference | front (size_type row) const |
NdArray< dtype > | getByIndices (const NdArray< uint32 > &inIndices) const |
NdArray< dtype > | getByMask (const NdArray< bool > &inMask) const |
bool | isempty () const noexcept |
bool | isflat () const noexcept |
NdArray< bool > | issorted (Axis inAxis=Axis::NONE) const |
bool | issquare () const noexcept |
value_type | item () const |
NdArray< dtype > | max (Axis inAxis=Axis::NONE) const |
NdArray< dtype > | median (Axis inAxis=Axis::NONE) const |
NdArray< dtype > | min (Axis inAxis=Axis::NONE) const |
NdArray< dtype > & | nans () noexcept |
uint64 | nbytes () const noexcept |
NdArray< dtype > | newbyteorder (Endian inEndianess) const |
NdArray< bool > | none (Axis inAxis=Axis::NONE) const |
std::pair< NdArray< uint32 >, NdArray< uint32 > > | nonzero () const |
uint32 | numCols () const noexcept |
uint32 | numRows () const noexcept |
NdArray< dtype > & | ones () noexcept |
template<typename Indices , enable_if_t< is_same_v< Indices, NdArray< int32 >>||is_same_v< Indices, NdArray< uint32 >>, int > = 0> | |
NdArray< dtype > | operator() (const Indices &rowIndices, int32 colIndex) const |
template<typename Indices , enable_if_t< is_same_v< Indices, NdArray< int32 >>||is_same_v< Indices, NdArray< uint32 >>, int > = 0> | |
NdArray< dtype > | operator() (const Indices &rowIndices, Slice colSlice) const |
const_reference | operator() (int32 inRowIndex, int32 inColIndex) const noexcept |
reference | operator() (int32 inRowIndex, int32 inColIndex) noexcept |
NdArray< dtype > | operator() (int32 inRowIndex, Slice inColSlice) const |
template<typename Indices , enable_if_t< is_same_v< Indices, NdArray< int32 >>||is_same_v< Indices, NdArray< uint32 >>, int > = 0> | |
NdArray< dtype > | operator() (int32 rowIndex, const Indices &colIndices) const |
template<typename RowIndices , typename ColIndices , enable_if_t< is_same_v< RowIndices, NdArray< int32 >>||is_same_v< RowIndices, NdArray< uint32 >>, int > = 0, enable_if_t< is_same_v< ColIndices, NdArray< int32 >>||is_same_v< ColIndices, NdArray< uint32 >>, int > = 0> | |
NdArray< dtype > | operator() (RowIndices rowIndices, ColIndices colIndices) const |
NdArray< dtype > | operator() (Slice inRowSlice, int32 inColIndex) const |
NdArray< dtype > | operator() (Slice inRowSlice, Slice inColSlice) const |
template<typename Indices , enable_if_t< is_same_v< Indices, NdArray< int32 >>||is_same_v< Indices, NdArray< uint32 >>, int > = 0> | |
NdArray< dtype > | operator() (Slice rowSlice, const Indices &colIndices) const |
NdArray< dtype > & | operator= (const NdArray< dtype > &rhs) |
NdArray< dtype > & | operator= (NdArray< dtype > &&rhs) noexcept |
NdArray< dtype > & | operator= (value_type inValue) noexcept |
template<typename Indices , enable_if_t< is_same_v< Indices, NdArray< size_type >>, int > = 0> | |
NdArray< dtype > | operator[] (const Indices &inIndices) const |
NdArray< dtype > | operator[] (const NdArray< bool > &inMask) const |
NdArray< dtype > | operator[] (const Slice &inSlice) const |
const_reference | operator[] (int32 inIndex) const noexcept |
reference | operator[] (int32 inIndex) noexcept |
bool | ownsInternalData () noexcept |
NdArray< dtype > & | partition (uint32 inKth, Axis inAxis=Axis::NONE) |
void | print () const |
NdArray< dtype > | prod (Axis inAxis=Axis::NONE) const |
NdArray< dtype > | ptp (Axis inAxis=Axis::NONE) const |
NdArray< dtype > & | put (const NdArray< uint32 > &inIndices, const NdArray< dtype > &inValues) |
NdArray< dtype > & | put (const NdArray< uint32 > &inIndices, value_type inValue) |
NdArray< dtype > & | put (const Slice &inRowSlice, const Slice &inColSlice, const NdArray< dtype > &inValues) |
NdArray< dtype > & | put (const Slice &inRowSlice, const Slice &inColSlice, value_type inValue) |
NdArray< dtype > & | put (const Slice &inRowSlice, int32 inColIndex, const NdArray< dtype > &inValues) |
NdArray< dtype > & | put (const Slice &inRowSlice, int32 inColIndex, value_type inValue) |
NdArray< dtype > & | put (const Slice &inSlice, const NdArray< dtype > &inValues) |
NdArray< dtype > & | put (const Slice &inSlice, value_type inValue) |
NdArray< dtype > & | put (int32 inIndex, value_type inValue) |
NdArray< dtype > & | put (int32 inRow, int32 inCol, value_type inValue) |
NdArray< dtype > & | put (int32 inRowIndex, const Slice &inColSlice, const NdArray< dtype > &inValues) |
NdArray< dtype > & | put (int32 inRowIndex, const Slice &inColSlice, value_type inValue) |
NdArray< dtype > & | putMask (const NdArray< bool > &inMask, const NdArray< dtype > &inValues) |
NdArray< dtype > & | putMask (const NdArray< bool > &inMask, value_type inValue) |
NdArray< dtype > & | ravel () noexcept |
const_reverse_iterator | rbegin () const noexcept |
reverse_iterator | rbegin () noexcept |
reverse_iterator | rbegin (size_type inRow) |
const_reverse_iterator | rbegin (size_type inRow) const |
const_reverse_column_iterator | rcolbegin () const noexcept |
reverse_column_iterator | rcolbegin () noexcept |
reverse_column_iterator | rcolbegin (size_type inCol) |
const_reverse_column_iterator | rcolbegin (size_type inCol) const |
const_reverse_column_iterator | rcolend () const noexcept |
reverse_column_iterator | rcolend () noexcept |
reverse_column_iterator | rcolend (size_type inCol) |
const_reverse_column_iterator | rcolend (size_type inCol) const |
const_reverse_iterator | rend () const noexcept |
reverse_iterator | rend () noexcept |
reverse_iterator | rend (size_type inRow) |
const_reverse_iterator | rend (size_type inRow) const |
NdArray< dtype > | repeat (const Shape &inRepeatShape) const |
NdArray< dtype > | repeat (uint32 inNumRows, uint32 inNumCols) const |
void | replace (value_type oldValue, value_type newValue) |
NdArray< dtype > & | reshape (const Shape &inShape) |
NdArray< dtype > & | reshape (int32 inNumRows, int32 inNumCols) |
NdArray< dtype > & | reshape (size_type inSize) |
NdArray< dtype > & | resizeFast (const Shape &inShape) |
NdArray< dtype > & | resizeFast (uint32 inNumRows, uint32 inNumCols) |
NdArray< dtype > & | resizeSlow (const Shape &inShape) |
NdArray< dtype > & | resizeSlow (uint32 inNumRows, uint32 inNumCols) |
NdArray< dtype > | round (uint8 inNumDecimals=0) const |
NdArray< dtype > | row (uint32 inRow) |
Slice | rSlice (int32 inStartIdx=0, uint32 inStepSize=1) const noexcept |
Shape | shape () const noexcept |
size_type | size () const noexcept |
NdArray< dtype > & | sort (Axis inAxis=Axis::NONE) |
std::string | str () const |
NdArray< dtype > | sum (Axis inAxis=Axis::NONE) const |
NdArray< dtype > | swapaxes () const |
void | tofile (const std::string &inFilename) const |
void | tofile (const std::string &inFilename, const char inSep) const |
NdArray< uint32 > | toIndices (Slice inSlice, Axis inAxis=Axis::ROW) const |
std::vector< dtype > | toStlVector () const |
value_type | trace (uint32 inOffset=0, Axis inAxis=Axis::ROW) const noexcept |
NdArray< dtype > | transpose () const |
NdArray< dtype > & | zeros () noexcept |
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
using nc::NdArray< dtype, Allocator >::allocator_type = Allocator |
using nc::NdArray< dtype, Allocator >::column_iterator = NdArrayColumnIterator<dtype, size_type, pointer, difference_type> |
using nc::NdArray< dtype, Allocator >::const_column_iterator = NdArrayConstColumnIterator<dtype, size_type, const_pointer, difference_type> |
using nc::NdArray< dtype, Allocator >::const_iterator = NdArrayConstIterator<dtype, const_pointer, difference_type> |
using nc::NdArray< dtype, Allocator >::const_pointer = typename AllocTraits::const_pointer |
using nc::NdArray< dtype, Allocator >::const_reference = const dtype& |
using nc::NdArray< dtype, Allocator >::const_reverse_column_iterator = std::reverse_iterator<const_column_iterator> |
using nc::NdArray< dtype, Allocator >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using nc::NdArray< dtype, Allocator >::difference_type = typename AllocTraits::difference_type |
using nc::NdArray< dtype, Allocator >::iterator = NdArrayIterator<dtype, pointer, difference_type> |
using nc::NdArray< dtype, Allocator >::pointer = typename AllocTraits::pointer |
using nc::NdArray< dtype, Allocator >::reference = dtype& |
using nc::NdArray< dtype, Allocator >::reverse_column_iterator = std::reverse_iterator<column_iterator> |
using nc::NdArray< dtype, Allocator >::reverse_iterator = std::reverse_iterator<iterator> |
using nc::NdArray< dtype, Allocator >::size_type = uint32 |
using nc::NdArray< dtype, Allocator >::value_type = dtype |
|
default |
Defualt Constructor, not very usefull...
|
inlineexplicit |
Constructor
inSquareSize | square number of rows and columns |
|
inline |
Constructor
inNumRows | |
inNumCols |
|
inlineexplicit |
Constructor
inShape |
|
inline |
Constructor
inList |
|
inline |
Constructor
inList | 2D initializer list |
|
inline |
Constructor
inArray | |
copy | (optional) boolean for whether to make a copy and own the data, or act as a non-owning shell. Default true. |
|
inline |
Constructor
in2dArray | |
copy | (optional) boolean for whether to make a copy and own the data, or act as a non-owning shell. Default true. |
|
inline |
Constructor
inVector | |
copy | (optional) boolean for whether to make a copy and own the data, or act as a non-owning shell. Default true. |
|
inlineexplicit |
Constructor
in2dVector |
|
inline |
Constructor
in2dArray | |
copy | (optional) boolean for whether to make a copy and own the data, or act as a non-owning shell. Default true. |
|
inlineexplicit |
Constructor
inDeque |
|
inlineexplicit |
Constructor
in2dDeque |
|
inlineexplicit |
Constructor
inList |
|
inline |
Constructor
inFirst | |
inLast |
|
inline |
Constructor. Copies the contents of the buffer into the array.
inPtr | const_pointer to beginning of buffer |
size | number of elements in buffer |
|
inline |
Constructor. Copies the contents of the buffer into the array.
inPtr | const_pointer to beginning of buffer |
numRows | number of rows of the buffer |
numCols | number of cols of the buffer |
|
inlinenoexcept |
Constructor. Operates as a shell around an already existing array of data.
inPtr | pointer to beginning of the array |
size | the number of elements in the array |
takeOwnership | whether or not to take ownership of the data and call delete[] in the destructor. |
|
inlinenoexcept |
Constructor. Operates as a shell around an already existing array of data.
inPtr | pointer to beginning of the array |
numRows | the number of rows in the array |
numCols | the nubmer of column in the array |
takeOwnership | whether or not to take ownership of the data and call delete[] in the destructor. |
|
inline |
Copy Constructor
inOtherArray |
|
inlinenoexcept |
Move Constructor
inOtherArray |
|
inlinenoexcept |
Destructor
|
inline |
Returns True if all elements evaluate to True or non zero
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.all.html
inAxis | (Optional, default NONE) |
|
inline |
Returns True if any elements evaluate to True or non zero
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.any.html
inAxis | (Optional, default NONE) |
|
inline |
Return indices of the maximum values along the given axis. Only the first index is returned.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.argmax.html
inAxis | (Optional, default NONE) |
|
inline |
Return indices of the minimum values along the given axis. Only the first index is returned.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.argmin.html
inAxis | (Optional, default NONE) |
|
inline |
Returns the indices that would sort this array.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.argsort.html
inAxis | (Optional, default NONE) |
|
inline |
Returns a copy of the array, cast to a specified type. Arithmetic to Arithmetic
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.astype.html
|
inline |
Returns a copy of the array, cast to a specified type. Arithmetic to Complex
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.astype.html
|
inline |
Returns a copy of the array, cast to a specified type. Complex to Complex
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.astype.html
|
inline |
Returns a copy of the array, cast to a specified type. Complex to Arithmetic
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.astype.html
|
inline |
const 2D access method with bounds checking
rowIndices | |
colIndices |
|
inline |
const 2D access method with bounds checking
inRowSlice | |
inColSlice |
|
inline |
const 2D access method with bounds checking
inRowSlice | |
inColIndex |
|
inline |
const 1D access method with bounds checking
inSlice |
|
inline |
1D access method with bounds checking
inIndex |
|
inline |
const 1D access method with bounds checking
inIndex |
|
inline |
const 2D access method with bounds checking
inRowIndex | |
inColSlice |
|
inline |
2D access method with bounds checking
inRowIndex | |
inColIndex |
|
inline |
const 2D access method with bounds checking
inRowIndex | |
inColIndex |
|
inlinenoexcept |
Returns a copy of the last element of the flattened array.
|
inlinenoexcept |
Returns a reference the last element of the flattened array.
|
inline |
Returns a reference the last element of the input row.
|
inline |
Returns a copy of the last element of the input row.
|
inlinenoexcept |
const iterator to the beginning of the flattened array
|
inlinenoexcept |
iterator to the beginning of the flattened array
|
inline |
iterator to the beginning of the input row
inRow |
|
inline |
const iterator to the beginning of the input row
inRow |
|
inlinenoexcept |
Swap the bytes of the array elements in place
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.byteswap.html
|
inlinenoexcept |
const iterator to the beginning of the flattened array
|
inline |
const iterator to the beginning of the input row
inRow |
|
inlinenoexcept |
const_column_iterator to the beginning of the flattened array
|
inline |
const_column_iterator to the beginning of the input column
inCol |
|
inlinenoexcept |
const_column_iterator to 1 past the end of the flattened array
|
inline |
const_column_iterator to 1 past the end of the input col
inCol |
|
inlinenoexcept |
const iterator to 1 past the end of the flattened array
|
inline |
const iterator to 1 past the end of the input row
inRow |
|
inline |
Returns an array whose values are limited to [min, max].
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.clip.html
inMin | min value to clip to |
inMax | max value to clip to |
|
inlinenoexcept |
const column_iterator to the beginning of the flattened array
|
inlinenoexcept |
column_iterator to the beginning of the flattened array
|
inline |
column_iterator to the beginning of the input column
inCol |
|
inline |
const column_iterator to the beginning of the input column
inCol |
|
inlinenoexcept |
const column_iterator to 1 past the end of the flattened array
|
inlinenoexcept |
column_iterator to 1 past the end of the flattened array
|
inline |
column_iterator to the 1 past end of the column
inCol |
|
inline |
const column_iterator to the 1 past end of the column
inCol |
|
inline |
Returns the full column of the array
|
inline |
returns whether or not a value is included the array
inValue | |
inAxis | (Optional, default NONE) |
|
inline |
Return a copy of the array
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.copy.html
|
inlinenoexcept |
const_reverse_iterator to the beginning of the flattened array
|
inline |
const_reverse_iterator to the beginning of the input row
inRow |
|
inlinenoexcept |
const_reverse_column_iterator to the beginning of the flattened array
|
inline |
const_reverse_column_iterator to the beginning of the input column
inCol |
|
inlinenoexcept |
const_reverse_column_iterator to 1 past the end of the flattened array
|
inline |
const_reverse_column_iterator to 1 past the end of the input col
inCol |
|
inlinenoexcept |
const_reverse_iterator to 1 past the end of the flattened array
|
inline |
const_reverse_iterator to 1 past the end of the input row
inRow |
|
inlinenoexcept |
|
inline |
Return the cumulative product of the elements along the given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.cumprod.html
inAxis | (Optional, default NONE) |
|
inline |
Return the cumulative sum of the elements along the given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.cumsum.html
inAxis | (Optional, default NONE) |
|
inlinenoexcept |
Returns the raw pointer to the underlying data
|
inlinenoexcept |
Returns the raw pointer to the underlying data
|
inlinenoexcept |
Releases the internal data pointer so that the destructor will not call delete on it, and returns the raw pointer to the underlying data.
|
inline |
Return specified diagonals.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.diagonal.html
inOffset | Offset of the diagonal from the main diagonal. Can be both positive and negative. Defaults to 0. |
inAxis | (Optional, default ROW) axis the offset is applied to |
|
inline |
Dot product of two arrays.
For 2-D arrays it is equivalent to matrix multiplication, and for 1-D arrays to inner product of vectors.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.dot.html
inOtherArray |
|
inline |
Dump a binary file of the array to the specified file. The array can be read back with nc::load.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.dump.html
inFilename |
|
inlinenoexcept |
const iterator to 1 past the end of the flattened array
|
inlinenoexcept |
iterator to 1 past the end of the flattened array
|
inline |
iterator to the 1 past end of the row
inRow |
|
inline |
const iterator to the 1 past end of the row
inRow |
|
inlinenoexcept |
Return the NdArrays endianess
|
inlinenoexcept |
Fill the array with a scaler value.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.fill.html
inFillValue |
|
inline |
Return the indices of the flattened array of the elements that are non-zero.
|
inline |
Return a copy of the array collapsed into one dimension.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.flatten.html
|
inlinenoexcept |
Returns a copy of the first element of the flattened array.
|
inlinenoexcept |
Returns a reference to the first element of the flattened array.
|
inline |
Returns a reference to the first element of the input row.
|
inline |
Returns a copy of the first element of the input row.
|
inline |
Returns a new flat array with the givin flat input indices.
inIndices |
|
inline |
Takes in a boolean mask the same size as the array and returns a flattened array with the values cooresponding to the input mask.
inMask |
|
inlinenoexcept |
Return if the NdArray is empty. ie the default construtor was used.
|
inlinenoexcept |
Return if the NdArray is empty. ie the default construtor was used.
|
inline |
|
inlinenoexcept |
Return if the NdArray is sorted.
|
inline |
Copy an element of an array to a standard C++ scaler and return it.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.item.html
|
inline |
Return the maximum along a given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.max.html
inAxis | (Optional, default NONE) |
|
inline |
Return the median along a given axis. If the dtype is floating point then the middle elements will be averaged for arrays of even number of elements. If the dtype is integral then the middle elements will be intager averaged (rounded down to integer) for arrays of even number of elements.
inAxis | (Optional, default NONE) |
|
inline |
Return the minimum along a given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.min.html
inAxis | (Optional, default NONE) |
|
inlinenoexcept |
Fills the array with nans.
|
inlinenoexcept |
Returns the number of bytes held by the array
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.nbytes.html
|
inline |
Return the array with the same data viewed with a different byte order. only works for integer types.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.newbyteorder.html
inEndianess |
|
inline |
Returns True if none elements evaluate to True or non zero
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.any.html
inAxis | (Optional, default NONE) |
std::pair< NdArray< uint32 >, NdArray< uint32 > > nc::NdArray< dtype, _Alloc >::nonzero |
Return the row/col indices of the array of the elements that are non-zero.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.nonzero.html
|
inlinenoexcept |
Returns the number of columns in the array
|
inlinenoexcept |
Returns the number of rows in the array
|
inlinenoexcept |
Fills the array with ones
|
inline |
2D index access operator with bounds checking. returned array is of the range.
rowIndices | |
colIndex |
|
inline |
2D index access operator with bounds checking. returned array is of the range.
rowIndices | |
colSlice |
|
inlinenoexcept |
const 2D access operator with no bounds checking
inRowIndex | |
inColIndex |
|
inlinenoexcept |
2D access operator with no bounds checking
inRowIndex | |
inColIndex |
|
inline |
2D Slicing access operator with bounds checking. returned array is of the range [start, stop).
inRowIndex | |
inColSlice |
|
inline |
2D index access operator with bounds checking. returned array is of the range.
rowIndex | |
colIndices |
|
inline |
2D index access operator with bounds checking. returned array is of the range.
rowIndices | |
colIndices |
|
inline |
2D Slicing access operator with bounds checking. returned array is of the range [start, stop).
inRowSlice | |
inColIndex |
|
inline |
2D Slicing access operator with bounds checking. returned array is of the range [start, stop).
inRowSlice | |
inColSlice |
|
inline |
2D index access operator with bounds checking. returned array is of the range.
rowSlice | |
colIndices |
|
inline |
Assignment operator, performs a deep copy
rhs |
|
inlinenoexcept |
Move operator, performs a deep move
rhs |
|
inlinenoexcept |
Assignment operator, sets the entire array to a single scaler value.
inValue |
|
inline |
|
inline |
|
inline |
1D Slicing access operator with bounds checking. returned array is of the range [start, stop).
inSlice |
|
inlinenoexcept |
const 1D access operator with no bounds checking
inIndex |
|
inlinenoexcept |
1D access operator with no bounds checking
inIndex |
|
inlinenoexcept |
Returns whether or not the array object owns the underlying data
|
inline |
Rearranges the elements in the array in such a way that value of the element in kth position is in the position it would be in a sorted array. All elements smaller than the kth element are moved before this element and all equal or greater are moved behind it. The ordering of the elements in the two partitions is undefined.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.partition.html
inKth | kth element |
inAxis | (Optional, default NONE) |
|
inline |
Prints the array to the console.
|
inline |
Return the product of the array elements over the given axis
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.prod.html
inAxis | (Optional, default NONE) |
|
inline |
Peak to peak (maximum - minimum) value along a given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.ptp.html
inAxis | (Optional, default NONE) |
|
inline |
Set a.flat[n] = values[n] for all n in indices.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inIndices | |
inValues |
|
inline |
Set a.flat[n] = values for all n in indices.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inIndices | |
inValue |
|
inline |
Set the slice indices to the input values.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowSlice | |
inColSlice | |
inValues |
|
inline |
Set the slice indices to the input value.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowSlice | |
inColSlice | |
inValue |
|
inline |
Set the slice indices to the input values.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowSlice | |
inColIndex | |
inValues |
|
inline |
Set the slice indices to the input value.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowSlice | |
inColIndex | |
inValue |
|
inline |
Set the slice indices to the input values.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inSlice | |
inValues |
|
inline |
Set the slice indices to the input value.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inSlice | |
inValue |
|
inline |
set the flat index element to the value
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inIndex | |
inValue |
|
inline |
set the 2D row/col index element to the value
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRow | |
inCol | |
inValue |
|
inline |
Set the slice indices to the input values.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowIndex | |
inColSlice | |
inValues |
|
inline |
Set the slice indices to the input value.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.put.html
inRowIndex | |
inColSlice | |
inValue |
|
inline |
Set the mask indices to the input values.
inMask | |
inValues |
|
inline |
Set the mask indices to the input value.
inMask | |
inValue |
|
inlinenoexcept |
Flattens the array but does not make a copy.
Numpy Reference: https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel.html
|
inlinenoexcept |
const iterator to the beginning of the flattened array
|
inlinenoexcept |
reverse_iterator to the beginning of the flattened array
|
inline |
reverse_iterator to the beginning of the input row
inRow |
|
inline |
const iterator to the beginning of the input row
inRow |
|
inlinenoexcept |
const iterator to the beginning of the flattened array
|
inlinenoexcept |
reverse_column_iterator to the beginning of the flattened array
|
inline |
reverse_column_iterator to the beginning of the input column
inCol |
|
inline |
const iterator to the beginning of the input column
inCol |
|
inlinenoexcept |
const_reverse_column_iterator to 1 past the end of the flattened array
|
inlinenoexcept |
reverse_column_iterator to 1 past the end of the flattened array
|
inline |
reverse_column_iterator to the 1 past end of the column
inCol |
|
inline |
const_reverse_column_iterator to the 1 past end of the column
inCol |
|
inlinenoexcept |
const_reverse_iterator to 1 past the end of the flattened array
|
inlinenoexcept |
reverse_iterator to 1 past the end of the flattened array
|
inline |
reverse_iterator to the 1 past end of the row
inRow |
|
inline |
const_reverse_iterator to the 1 past end of the row
inRow |
|
inline |
Repeat elements of an array.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.repeat.html
inRepeatShape |
|
inline |
Repeat elements of an array.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.repeat.html
inNumRows | |
inNumCols |
|
inline |
Replaces a value of the array with another value
oldValue | the value to replace |
newValue | the value to replace with |
|
inline |
The new shape should be compatible with the original shape. If an single integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.reshape.html
inShape |
|
inline |
The new shape should be compatible with the original shape. If an single integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.reshape.html
inNumRows | |
inNumCols |
|
inline |
The new shape should be compatible with the original shape. If an single integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.reshape.html
inSize |
|
inline |
Change shape and size of array in-place. All previous data of the array is lost.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html
inShape |
|
inline |
Change shape and size of array in-place. All previous data of the array is lost.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html
inNumRows | |
inNumCols |
|
inline |
Return a new array with the specified shape. If new shape is larger than old shape then array will be padded with zeros. If new shape is smaller than the old shape then the data will be discarded.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html
inShape |
|
inline |
Return a new array with the specified shape. If new shape is larger than old shape then array will be padded with zeros. If new shape is smaller than the old shape then the data will be discarded.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html
inNumRows | |
inNumCols |
|
inline |
Return a with each element rounded to the given number of decimals.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.round.html
inNumDecimals | (default 0) |
|
inline |
Returns the full row of the array
|
inlinenoexcept |
|
inlinenoexcept |
Return the shape of the array
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.shape.html
|
inlinenoexcept |
Return the size of the array
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.size.html
|
inline |
Sort an array, in-place.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.sort.html
inAxis | (Optional, default NONE) |
|
inline |
returns the NdArray as a string representation
|
inline |
Return the sum of the array elements over the given axis.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.sum.html
inAxis | (Optional, default NONE) |
|
inline |
Interchange two axes of an array. Equivalent to transpose...
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.swapaxes.html
|
inline |
Write array to a file as binary. The data produced by this method can be recovered using the function fromfile().
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html
inFilename |
|
inline |
Write array to a file as text. The data produced by this method can be recovered using the function fromfile().
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html
inFilename | |
inSep | Separator between array items for text output. |
|
inline |
Converts the slice object to an NdArray of indices for this array
inSlice | the slice object |
inAxis | the array axis |
|
inline |
Write flattened array to an STL vector
|
inlinenoexcept |
Return the sum along diagonals of the array.
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.trace.html
inOffset | Offset of the diagonal from the main diagonal. Can be both positive and negative. Defaults to 0. |
inAxis | (Optional, default ROW) Axis to offset from |
|
inline |
Tranpose the rows and columns of an array
Numpy Reference: https://www.numpy.org/devdocs/reference/generated/numpy.ndarray.transpose.html
|
inlinenoexcept |
Fills the array with zeros