libnpy 2.0.0
Lightweight C++ library for reading and writing NPY and NPZ files
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
npy::header_info Struct Reference

Class representing the header info for an NPY file. More...

#include <npy.h>

Collaboration diagram for npy::header_info:
Collaboration graph
[legend]

Public Member Functions

 header_info (const std::string &dictionary)
 
 header_info (data_type_t dtype, npy::endian_t endianness, bool fortran_order, const std::vector< size_t > &shape)
 Constructor.
 

Public Attributes

data_type_t dtype
 The data type of the NPY file.
 
npy::endian_t endianness
 The endianness of the data in the NPY file.
 
bool fortran_order
 
std::vector< size_t > shape
 A vector of values indicating the shape of each dimension of the tensor.
 
std::size_t max_element_length
 

Detailed Description

Class representing the header info for an NPY file.

Constructor & Destructor Documentation

◆ header_info() [1/2]

npy::header_info::header_info ( const std::string &  dictionary)
explicit

Constructor.

Parameters
dictionarya Python-encoded dictionary containing the header information

◆ header_info() [2/2]

npy::header_info::header_info ( data_type_t  dtype,
npy::endian_t  endianness,
bool  fortran_order,
const std::vector< size_t > &  shape 
)

Constructor.

Member Data Documentation

◆ dtype

data_type_t npy::header_info::dtype

The data type of the NPY file.

◆ endianness

npy::endian_t npy::header_info::endianness

The endianness of the data in the NPY file.

◆ fortran_order

bool npy::header_info::fortran_order

Whether the values in the tensor are stored in FORTRAN, or column major, order

◆ max_element_length

std::size_t npy::header_info::max_element_length

Value used to indicate the maximum length of an element (used by Unicode strings)

◆ shape

std::vector<size_t> npy::header_info::shape

A vector of values indicating the shape of each dimension of the tensor.


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