Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca-npy.H File Reference

NumPy .npy writer for CA frames. More...

#include <bit>
#include <concepts>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <ah-errors.H>
#include <ca-frame-stream.H>
#include <tpl_ca_concepts.H>
Include dependency graph for ca-npy.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::CA::Npy_Frame_Sink
 Path-pattern sink that writes one .npy file per frame. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::CA
 
namespace  Aleph::CA::ca_npy_detail
 

Functions

template<typename T >
std::string Aleph::CA::ca_npy_detail::dtype_descr ()
 
template<typename T >
void Aleph::CA::ca_npy_detail::write_scalar (std::ostream &out, const T &value)
 
template<std::size_t Dim, typename Lattice >
void Aleph::CA::ca_npy_detail::write_payload_rec (std::ostream &out, const Lattice &frame, typename Lattice::coord_type &coord)
 
template<typename Lattice >
std::string Aleph::CA::ca_npy_detail::shape_tuple (const Lattice &frame)
 
template<typename Lattice >
void Aleph::CA::write_npy (std::ostream &out, const Lattice &frame)
 Write a lattice frame as a NumPy .npy array.
 

Detailed Description

NumPy .npy writer for CA frames.

The backend writes NPY version 1.0 arrays in C order. Numeric cell states are emitted as their natural fixed-width dtype, making the output directly loadable with numpy.load().

Author
Leandro Rabindranath Leon

Definition in file ca-npy.H.