WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
cnpy::NpyArray Struct Reference

#include <cnpy.h>

Public Member Functions

 NpyArray (const std::vector< size_t > &_shape, size_t _word_size, bool _fortran_order)
 
 NpyArray ()
 
template<typename T >
T * data ()
 
template<typename T >
const T * data () const
 
template<typename T >
std::vector< T > as_vec () const
 
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
 
size_t num_vals
 

Detailed Description

Definition at line 24 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 
)
inline

Definition at line 25 of file cnpy.h.

◆ NpyArray() [2/2]

cnpy::NpyArray::NpyArray ( )
inline

Definition at line 34 of file cnpy.h.

Member Function Documentation

◆ as_vec()

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

Definition at line 47 of file cnpy.h.

◆ data() [1/2]

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

Definition at line 37 of file cnpy.h.

Here is the caller graph for this function:

◆ data() [2/2]

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

Definition at line 42 of file cnpy.h.

◆ num_bytes()

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

Definition at line 52 of file cnpy.h.

Here is the caller graph for this function:

Member Data Documentation

◆ data_holder

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

Definition at line 56 of file cnpy.h.

◆ fortran_order

bool cnpy::NpyArray::fortran_order

Definition at line 59 of file cnpy.h.

◆ num_vals

size_t cnpy::NpyArray::num_vals

Definition at line 60 of file cnpy.h.

◆ shape

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

Definition at line 57 of file cnpy.h.

◆ word_size

size_t cnpy::NpyArray::word_size

Definition at line 58 of file cnpy.h.


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