Mantid
Loading...
Searching...
No Matches
FunctionDomain1DHistogram.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8
12
13#include <boost/python/class.hpp>
14#include <boost/python/make_constructor.hpp>
15#include <boost/python/module.hpp>
16
19using namespace Mantid::PythonInterface;
21using namespace boost::python;
22
23GET_POINTER_SPECIALIZATION(FunctionDomain1Histogram)
24
26 if (NDArray::check(bins)) {
28 } else {
30 }
31}
32
34
35 class_<FunctionDomain1DHistogram, bases<FunctionDomain1D>, boost::noncopyable>("FunctionDomain1DHistogram", no_init)
36 .def("__init__", make_constructor(&createFunctionDomain1DHistogram, default_call_policies(), (arg("bins"))));
37}
FunctionDomain1DHistogram * createFunctionDomain1DHistogram(const boost::python::object &bins)
void export_FunctionDomain1DHistogram()
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
Implements FunctionDomain1D as a set of bins for a histogram.
Represent a domain for functions of one real argument.
Thin object wrapper around a numpy array.
Definition: NDArray.h:31
static bool check(const boost::python::object &obj)
Check if a python object points to an array type object.
Definition: NDArray.cpp:49
Definition: NDArray.h:49
Converter taking an input numpy array and converting it to a std::vector.
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the templa...