Loading...
Searching...
No Matches
cnpy::NpyArray Struct Reference

Public Member Functions

 NpyArray (const std::vector< size_t > &_shape, size_t _word_size, bool _fortran_order, std::string _number_type)
template<typename T>
T * data ()
template<typename T>
const T * data () const
template<typename T>
std::vector< T > as_vec ()
size_t num_bytes () const

Public Attributes

std::shared_ptr< std::vector< char > > data_holder
std::vector< size_t > shape
size_t word_size
bool fortran_order
std::string number_type
size_t num_vals

Detailed Description

Definition at line 33 of file cnpy.H.

Constructor & Destructor Documentation

◆ NpyArray() [1/2]

cnpy::NpyArray::NpyArray ( const std::vector< size_t > & _shape,
size_t _word_size,
bool _fortran_order,
std::string _number_type )
inline

Definition at line 35 of file cnpy.H.

◆ NpyArray() [2/2]

cnpy::NpyArray::NpyArray ( )
inline

Definition at line 51 of file cnpy.H.

Member Function Documentation

◆ as_vec()

template<typename T>
std::vector< T > cnpy::NpyArray::as_vec ( )
inline

Definition at line 66 of file cnpy.H.

◆ data() [1/2]

template<typename T>
T * cnpy::NpyArray::data ( )
inline

Definition at line 54 of file cnpy.H.

◆ data() [2/2]

template<typename T>
const T * cnpy::NpyArray::data ( ) const
inline

Definition at line 60 of file cnpy.H.

◆ num_bytes()

size_t cnpy::NpyArray::num_bytes ( ) const
inline

Definition at line 152 of file cnpy.H.

Member Data Documentation

◆ data_holder

std::shared_ptr<std::vector<char > > cnpy::NpyArray::data_holder

Definition at line 157 of file cnpy.H.

◆ fortran_order

bool cnpy::NpyArray::fortran_order

Definition at line 160 of file cnpy.H.

◆ num_vals

size_t cnpy::NpyArray::num_vals

Definition at line 162 of file cnpy.H.

◆ number_type

std::string cnpy::NpyArray::number_type

Definition at line 161 of file cnpy.H.

◆ shape

std::vector<size_t> cnpy::NpyArray::shape

Definition at line 158 of file cnpy.H.

◆ word_size

size_t cnpy::NpyArray::word_size

Definition at line 159 of file cnpy.H.


The documentation for this struct was generated from the following file: