Skip to main content

NpyFileInfo

NpyFileInfo

Metadata parsed from a .npy file header.

#include <NpyDatasetPreviewModel.hpp>

Public Attributes

Name
QString dtype_str
NumPy dtype string (e.g. “<f4”, “<i8”).
char byte_order
‘<’ little-endian, ‘>’ big-endian, ’
char type_kind
‘f’ float, ‘i’ signed int, ‘u’ unsigned int, ‘b’ bool
unsigned int item_size
Size of each element in bytes.
bool fortran_order
Whether data is in Fortran (column-major) order.
std::vector< uint64_t > shape
Shape of the array.
qint64 total_elements
Total number of elements.
qint64 data_offset
Byte offset where data begins in the file.

Public Attributes Documentation

variable dtype_str

QString dtype_str;

NumPy dtype string (e.g. “<f4”, “<i8”).

variable byte_order

char byte_order = '<';

‘<’ little-endian, ‘>’ big-endian, ‘|’ not applicable

variable type_kind

char type_kind = 'f';

‘f’ float, ‘i’ signed int, ‘u’ unsigned int, ‘b’ bool

variable item_size

unsigned int item_size = 4;

Size of each element in bytes.

variable fortran_order

bool fortran_order = false;

Whether data is in Fortran (column-major) order.

variable shape

std::vector< uint64_t > shape;

Shape of the array.

variable total_elements

qint64 total_elements = 0;

Total number of elements.

variable data_offset

qint64 data_offset = 0;

Byte offset where data begins in the file.


Updated on 2026-11-13 at 20:25:39 +0000