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

#include <cnpy.H>

Public Member Functions

 NpyArray (const std::vector< size_t > &_shape, size_t _word_size, bool _fortran_order, std::string _number_type)
 
 NpyArray ()
 
template<typename T >
Tdata ()
 
template<typename T >
const Tdata () const
 
template<typename T >
std::vector< Tas_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 31 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 33 of file cnpy.H.

◆ NpyArray() [2/2]

cnpy::NpyArray::NpyArray ( )
inline

Definition at line 49 of file cnpy.H.

Member Function Documentation

◆ as_vec()

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

Definition at line 64 of file cnpy.H.

◆ data() [1/2]

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

Definition at line 52 of file cnpy.H.

◆ data() [2/2]

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

Definition at line 58 of file cnpy.H.

◆ num_bytes()

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

Definition at line 150 of file cnpy.H.

Member Data Documentation

◆ data_holder

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

Definition at line 155 of file cnpy.H.

◆ fortran_order

bool cnpy::NpyArray::fortran_order

Definition at line 158 of file cnpy.H.

◆ num_vals

size_t cnpy::NpyArray::num_vals

Definition at line 160 of file cnpy.H.

◆ number_type

std::string cnpy::NpyArray::number_type

Definition at line 159 of file cnpy.H.

◆ shape

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

Definition at line 156 of file cnpy.H.

◆ word_size

size_t cnpy::NpyArray::word_size

Definition at line 157 of file cnpy.H.


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