AARE
Data analysis library for PSI hybrid detectors
Loading...
Searching...
No Matches
Data Structures | Namespaces | Typedefs | Functions | Variables
NumpyHelpers.hpp File Reference
#include <algorithm>
#include <array>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
#include "aare/core/DType.hpp"
#include "aare/core/defs.hpp"

Go to the source code of this file.

Data Structures

struct  aare::NumpyHeader
 

Namespaces

namespace  aare
 Frame class to represent a single frame of data model class should be able to work with streams coming from files or network.
 
namespace  aare::NumpyHelpers
 

Typedefs

using aare::shape_t = std::vector< size_t >
 

Functions

std::string aare::NumpyHelpers::parse_str (const std::string &in)
 
std::string aare::NumpyHelpers::trim (const std::string &str)
 
std::vector< std::string > aare::NumpyHelpers::parse_tuple (std::string in)
 
bool aare::NumpyHelpers::parse_bool (const std::string &in)
 
std::string aare::NumpyHelpers::get_value_from_map (const std::string &mapstr)
 
std::unordered_map< std::string, std::string > aare::NumpyHelpers::parse_dict (std::string in, const std::vector< std::string > &keys)
 
template<typename T , size_t N>
bool aare::NumpyHelpers::in_array (T val, const std::array< T, N > &arr)
 
bool aare::NumpyHelpers::is_digits (const std::string &str)
 
aare::DType aare::NumpyHelpers::parse_descr (std::string typestring)
 
size_t aare::NumpyHelpers::write_header (std::filesystem::path fname, const NumpyHeader &header)
 
size_t aare::NumpyHelpers::write_header (std::ostream &out, const NumpyHeader &header)
 

Variables

const constexpr std::array< char, 6 > aare::NumpyHelpers::magic_str {'\x93', 'N', 'U', 'M', 'P', 'Y'}
 
const uint8_t aare::NumpyHelpers::magic_string_length {6}