BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ArrayUtils.h File Reference

Defines various functions to interact from numpy on Python side. More...

Go to the source code of this file.

Classes

class  ArrayUtils::CreateDataImpl
 

Namespaces

 ArrayUtils
 Array and Numpy utility functions getShape, createNumpyArray.
 

Functions

template<class T >
std::pair< size_t, size_t > ArrayUtils::getShape (const T &data)
 Returns shape nrows, ncols of 2D array.
 
template<class T >
CreateDataImpl::ReturnType< T > ArrayUtils::createData (const T &vec)
 Creates OutputData array from input vector.
 
PyObject * ArrayUtils::createNumpyArray (const std::vector< double > &data)
 
template<class T >
decltype(auto) ArrayUtils::createVector1D (const T &data)
 Creates 1D vector from OutputData.
 
template<class T >
decltype(auto) ArrayUtils::createVector2D (const T &data)
 Creates 2D vector from OutputData.
 

Detailed Description

Defines various functions to interact from numpy on Python side.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file ArrayUtils.h.