occ
Loading...
Searching...
No Matches
occ::core::numpy Namespace Reference

Namespaces

namespace  impl
 

Classes

struct  NumpyArray
 

Functions

char host_endian_char ()
 
template<typename T >
constexpr char type_char ()
 
void parse_numpy_header (const std::string header, size_t &word_size, std::vector< size_t > &shape, bool &fortran_order)
 
void parse_numpy_header (std::istream &file, size_t &word_size, std::vector< size_t > &shape, bool &fortran_order)
 
void parse_numpy_header (unsigned char *buffer, size_t &word_size, std::vector< size_t > &shape, bool &fortran_order)
 
void parse_zip_footer (std::istream &file, uint16_t &num_records, size_t &global_header_size, size_t &global_header_offset)
 
NumpyArray parse_npy_array (std::istream &file)
 
NumpyArray load_npy (const std::string &fname)
 
template<typename ScalarType , bool column_major = false>
std::vector< char > create_npy_header (const std::vector< size_t > &shape)
 
template<typename ScalarType , bool column_major = false>
void save_npy (const std::string &filename, const ScalarType *data, const std::vector< size_t > &shape, const std::string mode="w")
 
template<typename T >
void save_npy (const std::string &filename, const Eigen::DenseBase< T > &mat, std::string mode="w")
 
template<typename T , bool column_major = false>
void save_npy (const std::string &filename, const std::vector< T > &data, std::string mode="w")
 

Function Documentation

◆ create_npy_header()

template<typename ScalarType , bool column_major = false>
std::vector< char > occ::core::numpy::create_npy_header ( const std::vector< size_t > &  shape)
inline

◆ host_endian_char()

char occ::core::numpy::host_endian_char ( )
inline

◆ load_npy()

NumpyArray occ::core::numpy::load_npy ( const std::string &  fname)
inline

◆ parse_npy_array()

NumpyArray occ::core::numpy::parse_npy_array ( std::istream &  file)
inline

◆ parse_numpy_header() [1/3]

void occ::core::numpy::parse_numpy_header ( const std::string  header,
size_t &  word_size,
std::vector< size_t > &  shape,
bool &  fortran_order 
)
inline

◆ parse_numpy_header() [2/3]

void occ::core::numpy::parse_numpy_header ( std::istream &  file,
size_t &  word_size,
std::vector< size_t > &  shape,
bool &  fortran_order 
)
inline

◆ parse_numpy_header() [3/3]

void occ::core::numpy::parse_numpy_header ( unsigned char *  buffer,
size_t &  word_size,
std::vector< size_t > &  shape,
bool &  fortran_order 
)
inline

◆ parse_zip_footer()

void occ::core::numpy::parse_zip_footer ( std::istream &  file,
uint16_t &  num_records,
size_t &  global_header_size,
size_t &  global_header_offset 
)
inline

◆ save_npy() [1/3]

template<typename T >
void occ::core::numpy::save_npy ( const std::string &  filename,
const Eigen::DenseBase< T > &  mat,
std::string  mode = "w" 
)
inline

◆ save_npy() [2/3]

template<typename ScalarType , bool column_major = false>
void occ::core::numpy::save_npy ( const std::string &  filename,
const ScalarType *  data,
const std::vector< size_t > &  shape,
const std::string  mode = "w" 
)
inline

◆ save_npy() [3/3]

template<typename T , bool column_major = false>
void occ::core::numpy::save_npy ( const std::string &  filename,
const std::vector< T > &  data,
std::string  mode = "w" 
)
inline

◆ type_char()

template<typename T >
constexpr char occ::core::numpy::type_char ( )
constexpr