diff --git a/Device/Histo/Histogram2D.cpp b/Device/Histo/Histogram2D.cpp index aad9707987c7483ada4de7ffefd39be7db724bad..b7ebd958c6dc50598ba7e715c88b4d72ad87ed1d 100644 --- a/Device/Histo/Histogram2D.cpp +++ b/Device/Histo/Histogram2D.cpp @@ -40,27 +40,6 @@ Histogram2D::Histogram2D(const Powerfield<double>& data) init_from_data(data); } -// IMPORTANT intentionally passed by copy to avoid problems on Python side -Histogram2D::Histogram2D(std::vector<std::vector<double>> data) -{ - initFromShape(data); - this->setContent(data); -} - -void Histogram2D::initFromShape(const std::vector<std::vector<double>>& data) -{ - auto shape = DataUtils::Array::getShape(data); - const size_t nrows = shape.first; - const size_t ncols = shape.second; - - if (nrows == 0 || ncols == 0) - throw std::runtime_error("Histogram2D::Histogram2D() -> Error. " - "Not a two-dimensional numpy array"); - - m_data.addAxis(FixedBinAxis("x-axis", ncols, 0.0, static_cast<double>(ncols))); - m_data.addAxis(FixedBinAxis("y-axis", nrows, 0.0, static_cast<double>(nrows))); -} - Histogram2D* Histogram2D::clone() const { return new Histogram2D(*this); diff --git a/Device/Histo/Histogram2D.h b/Device/Histo/Histogram2D.h index cb6dade65ef2b0d421a2456db147d9f6183ae64f..9718c26020cd28127f7148efaa887655b32026b0 100644 --- a/Device/Histo/Histogram2D.h +++ b/Device/Histo/Histogram2D.h @@ -49,7 +49,7 @@ public: Histogram2D(const Powerfield<double>& data); //! Constructor for 2D histograms from numpy array (thanks to swig) - Histogram2D(std::vector<std::vector<double>> data); +// Histogram2D(std::vector<std::vector<double>> data); //! Returns clone of other histogram Histogram2D* clone() const override; @@ -100,8 +100,6 @@ public: void addContent(const std::vector<std::vector<double>>& data); protected: - void initFromShape(const std::vector<std::vector<double>>& data); - //! Creates projection along X. The projections is made by collecting the data in the range //! between [ybinlow, ybinup]. Histogram1D* create_projectionX(int ybinlow, int ybinup); diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp index af2a1b2a735b018fbc5c61eaaedc1b3dba8ad812..1a38501b3913c38bc226c1a8a2325922e7f285a9 100644 --- a/Device/Histo/IHistogram.cpp +++ b/Device/Histo/IHistogram.cpp @@ -246,16 +246,6 @@ IHistogram* IHistogram::createHistogram(const Powerfield<double>& source) throw std::runtime_error(message.str()); } -IHistogram* IHistogram::createFrom(const std::string& filename) -{ - return IOFactory::readIntensityData(filename); -} - -IHistogram* IHistogram::createFrom(const std::vector<std::vector<double>>& data) -{ - return new Histogram2D(data); -} - void IHistogram::check_x_axis() const { if (rank() < 1) { diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h index d9da9fff8340023f65e2fd5a4b769283426f1f50..9d8fbd247b4ef8208168510d74df3ae904f75dd7 100644 --- a/Device/Histo/IHistogram.h +++ b/Device/Histo/IHistogram.h @@ -149,12 +149,6 @@ public: static IHistogram* createHistogram(const Powerfield<double>& source); - //! Creates new histogram from file content. - static IHistogram* createFrom(const std::string& filename); - - //! Create new histogram from numpy array. - static IHistogram* createFrom(const std::vector<std::vector<double>>& data); - //! Creates new Powerfield with histogram's shape and values corresponding to DataType. Powerfield<double>* createPowerfield(DataType dataType = DataType::INTEGRAL) const; diff --git a/Tests/PyUnit/histogram2d.py b/Tests/PyUnit/histogram2d.py deleted file mode 100644 index ae61004816210060c1183538e6566538ea850bc8..0000000000000000000000000000000000000000 --- a/Tests/PyUnit/histogram2d.py +++ /dev/null @@ -1,126 +0,0 @@ -import unittest -import numpy -import bornagain as ba - - -class Histogram2DTest(unittest.TestCase): - - def test_constructFromNumpyInt(self): - """ - Testing construction of 2D histogram from numpy array. - Automatic conversion under Python3 is not working, that's why it is float64 and not int64 - """ - arr = numpy.array( - [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]], - numpy.float64) - hist = ba.Histogram2D(arr) - - self.assertEqual(hist.getNbinsX(), 5) - self.assertEqual(hist.xMin(), 0) - self.assertEqual(hist.xMax(), 5) - - self.assertEqual(hist.getNbinsY(), 3) - self.assertEqual(hist.yMin(), 0) - self.assertEqual(hist.yMax(), 3) - - self.assertEqual(hist.binContent(0, 0), 11) - self.assertEqual(hist.binContent(0, 1), 6) - self.assertEqual(hist.binContent(4, 2), 5) - - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element, arr_from_hist[x][y]) - - def test_constructFromNumpyDouble(self): - """ - Testing construction of 2D histogram from numpy array - """ - arr = numpy.array([[1, 2, 3, 4, 5.0], [6, 7, 8, 9, 10.0], - [11, 12, 13, 14, 15.0]], - dtype=numpy.float64) - hist = ba.Histogram2D(arr) - - self.assertEqual(hist.getNbinsX(), 5) - self.assertEqual(hist.xMin(), 0) - self.assertEqual(hist.xMax(), 5) - - self.assertEqual(hist.getNbinsY(), 3) - self.assertEqual(hist.yMin(), 0) - self.assertEqual(hist.yMax(), 3) - - self.assertEqual(hist.binContent(0, 0), 11) - self.assertEqual(hist.binContent(0, 1), 6) - self.assertEqual(hist.binContent(4, 2), 5) - - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element, arr_from_hist[x][y]) - - def test_constructAndAddFromNumpyInt(self): - """ - Adding to the histogram content from numpy array - """ - arr = numpy.array( - [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]], - dtype=numpy.float64) - print(type(arr)) - hist = ba.Histogram2D(arr) - # adding same content once again - hist.addContent(arr) - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element*2, arr_from_hist[x][y]) - - def test_constructAndAddFromNumpyDouble(self): - """ - Adding to the histogram content from numpy array - """ - arr = numpy.array([[1, 2, 3, 4, 5.0], [6, 7, 8, 9, 10.0], - [11, 12, 13, 14, 15.0]], - dtype=numpy.float64) - hist = ba.Histogram2D(arr) - # adding same content once again - hist.addContent(arr) - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element*2, arr_from_hist[x][y]) - - def create_histogram(self, arr): - """ - Returns newly created object - """ - return ba.IHistogram.createFrom(arr) - - def test_createFromInt(self): - """ - Testing newly create object - """ - arr = numpy.array( - [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]], - dtype=numpy.float64) - hist = self.create_histogram(arr) - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element, arr_from_hist[x][y]) - - def test_createFromDouble(self): - """ - Testing newly create object - """ - arr = numpy.array([[1, 2, 3, 4, 5.0], [6, 7, 8, 9, 10.0], - [11, 12, 13, 14, 15.0]], - dtype=numpy.float64) - hist = self.create_histogram(arr) - arr_from_hist = hist.array() - - for (x, y), element in numpy.ndenumerate(arr): - self.assertEqual(element, arr_from_hist[x][y]) - - -if __name__ == '__main__': - unittest.main() diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i index b297dd35c8b2782ccf988d3918e87ec1850d0bc6..710e4f1fa03d5c4847d74ab802d44f6a6d8b433a 100644 --- a/Wrap/Swig/libBornAgainDevice.i +++ b/Wrap/Swig/libBornAgainDevice.i @@ -62,8 +62,6 @@ %newobject DetectorMask::createHistogram() const; %newobject DataUtils::Data::importArrayToPowerfield; -%newobject IHistogram::createFrom(const std::string& filename); -%newobject IHistogram::createFrom(const std::vector<std::vector<double>>& data); %include "Device/Data/Powerfield.h" %template(IntensityData) Powerfield<double>; diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 752656a7c7470d432a6bab64d72d8a612276d93d..45e1ad20eaa42ee49cb142d2f54dbc6727e35284 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -739,14 +739,11 @@ Constructor for 2D histogram with custom axes. Constructor for 2D histograms from basic Powerfield object. "; -%feature("docstring") Histogram2D::Histogram2D "Histogram2D::Histogram2D(std::vector< std::vector< double >> data) - -Constructor for 2D histograms from numpy array (thanks to swig) -"; - %feature("docstring") Histogram2D::clone "Histogram2D * Histogram2D::clone() const override -Returns clone of other histogram. +Constructor for 2D histograms from numpy array (thanks to swig) + +Returns clone of other histogram "; %feature("docstring") Histogram2D::rank "size_t Histogram2D::rank() const override @@ -1216,7 +1213,7 @@ C++ includes: Powerfield.h Returns number of dimensions. "; -%feature("docstring") IField::axis "const IAxis& IField::axis(size_t serial_number) const +%feature("docstring") IField::axis "const IAxis & IField::axis(size_t serial_number) const Returns axis with given serial number. "; @@ -1253,7 +1250,7 @@ The name of selected axis. corresponding bin center of selected axis "; -%feature("docstring") IField::getAxesValues "std::vector<double> IField::getAxesValues(size_t global_index) const +%feature("docstring") IField::getAxesValues "std::vector< double > IField::getAxesValues(size_t global_index) const Returns values on all defined axes for given globalbin number @@ -1314,7 +1311,7 @@ The name of selected axis. Corresponding bin index for selected axis "; -%feature("docstring") IField::getAxesBinIndices "std::vector<int> IField::getAxesBinIndices(size_t global_index) const +%feature("docstring") IField::getAxesBinIndices "std::vector< int > IField::getAxesBinIndices(size_t global_index) const Returns vector of axes indices for given global index @@ -2155,6 +2152,15 @@ Allocates memory for current dimensions configuration. %feature("docstring") Powerfield::normalizedToMaximum "const Powerfield<double>& Powerfield< T >::normalizedToMaximum() "; +%feature("docstring") Powerfield::getArray "PyObject * Powerfield< double >::getArray() const +"; + +%feature("docstring") Powerfield::getValue "double Powerfield< double >::getValue(size_t index) const +"; + +%feature("docstring") Powerfield::normalizedToMaximum "const Powerfield< double > & Powerfield< double >::normalizedToMaximum() +"; + %feature("docstring") Powerfield::getArray "PyObject * Powerfield< double >::getArray() const Returns data as Python numpy array. diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 03e226c041f3c62d29b5826df68eb5e932db41f5..5b635aa6ef71e833541211987e44ee9042a48dc1 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -2084,7 +2084,7 @@ class IField(object): def axis(self, serial_number): r""" axis(IField self, size_t serial_number) -> IAxis - const IAxis& IField::axis(size_t serial_number) const + const IAxis & IField::axis(size_t serial_number) const Returns axis with given serial number. @@ -2116,7 +2116,7 @@ class IField(object): def getAxesValues(self, global_index): r""" getAxesValues(IField self, size_t global_index) -> vdouble1d_t - std::vector<double> IField::getAxesValues(size_t global_index) const + std::vector< double > IField::getAxesValues(size_t global_index) const Returns values on all defined axes for given globalbin number @@ -2156,7 +2156,7 @@ class IField(object): def getAxesBinIndices(self, global_index): r""" getAxesBinIndices(IField self, size_t global_index) -> vector_integer_t - std::vector<int> IField::getAxesBinIndices(size_t global_index) const + std::vector< int > IField::getAxesBinIndices(size_t global_index) const Returns vector of axes indices for given global index @@ -2406,9 +2406,7 @@ class IntensityData(IField): def getValue(self, index): r""" getValue(IntensityData self, size_t index) -> double - double Powerfield< T >::getValue(size_t index) const - - Returns value or summed value, depending on T. + double Powerfield< double >::getValue(size_t index) const """ return _libBornAgainDevice.IntensityData_getValue(self, index) @@ -2446,7 +2444,7 @@ class IntensityData(IField): def normalizedToMaximum(self): r""" normalizedToMaximum(IntensityData self) -> IntensityData - const Powerfield<double>& Powerfield< T >::normalizedToMaximum() + const Powerfield< double > & Powerfield< double >::normalizedToMaximum() """ return _libBornAgainDevice.IntensityData_normalizedToMaximum(self) @@ -4905,14 +4903,6 @@ class IHistogram(object): r"""createHistogram(IntensityData source) -> IHistogram""" return _libBornAgainDevice.IHistogram_createHistogram(source) - @staticmethod - def createFrom(*args): - r""" - createFrom(std::string const & filename) -> IHistogram - createFrom(vdouble2d_t data) -> IHistogram - """ - return _libBornAgainDevice.IHistogram_createFrom(*args) - def createPowerfield(self, *args): r""" createPowerfield(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData @@ -4986,13 +4976,6 @@ def IHistogram_createHistogram(source): r"""IHistogram_createHistogram(IntensityData source) -> IHistogram""" return _libBornAgainDevice.IHistogram_createHistogram(source) -def IHistogram_createFrom(*args): - r""" - IHistogram_createFrom(std::string const & filename) -> IHistogram - IHistogram_createFrom(vdouble2d_t data) -> IHistogram - """ - return _libBornAgainDevice.IHistogram_createFrom(*args) - class Histogram1D(IHistogram): r""" @@ -5136,10 +5119,9 @@ class Histogram2D(IHistogram): __init__(Histogram2D self, int nbinsx, vdouble1d_t xbins, int nbinsy, vdouble1d_t ybins) -> Histogram2D __init__(Histogram2D self, IAxis axis_x, IAxis axis_y) -> Histogram2D __init__(Histogram2D self, IntensityData data) -> Histogram2D - __init__(Histogram2D self, vdouble2d_t data) -> Histogram2D - Histogram2D::Histogram2D(std::vector< std::vector< double >> data) + Histogram2D::Histogram2D(const Powerfield< double > &data) - Constructor for 2D histograms from numpy array (thanks to swig) + Constructor for 2D histograms from basic Powerfield object. """ _libBornAgainDevice.Histogram2D_swiginit(self, _libBornAgainDevice.new_Histogram2D(*args)) @@ -5149,7 +5131,9 @@ class Histogram2D(IHistogram): clone(Histogram2D self) -> Histogram2D Histogram2D * Histogram2D::clone() const override - Returns clone of other histogram. + Constructor for 2D histograms from numpy array (thanks to swig) + + Returns clone of other histogram """ return _libBornAgainDevice.Histogram2D_clone(self) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index f470e8ad82d19e4fa3b21fd90b8e41d2255df0c1..9889a78424bb58079e378fad3f19f80e189f76e3 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -38805,96 +38805,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IHistogram_createFrom__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - IHistogram *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createFrom" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_createFrom" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = (IHistogram *)IHistogram::createFrom((std::string const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IHistogram, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IHistogram_createFrom__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - IHistogram *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; - res1 = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_createFrom" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_createFrom" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &""'"); - } - arg1 = ptr; - } - result = (IHistogram *)IHistogram::createFrom((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IHistogram, SWIG_POINTER_OWN | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IHistogram_createFrom(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "IHistogram_createFrom", 0, 1, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v; - int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_IHistogram_createFrom__SWIG_0(self, argc, argv); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_IHistogram_createFrom__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IHistogram_createFrom'.\n" - " Possible C/C++ prototypes are:\n" - " IHistogram::createFrom(std::string const &)\n" - " IHistogram::createFrom(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n"); - return 0; -} - - SWIGINTERN PyObject *_wrap_IHistogram_createPowerfield__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; IHistogram *arg1 = (IHistogram *) 0 ; @@ -39945,29 +39855,6 @@ fail: } -SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_4(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > arg1 ; - Histogram2D *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; - int res = swig::asptr(swig_obj[0], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Histogram2D" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - result = (Histogram2D *)new Histogram2D(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram2D, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_Histogram2D(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[7] = { @@ -39984,14 +39871,6 @@ SWIGINTERN PyObject *_wrap_new_Histogram2D(PyObject *self, PyObject *args) { return _wrap_new_Histogram2D__SWIG_3(self, argc, argv); } } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Histogram2D__SWIG_4(self, argc, argv); - } - } if (argc == 2) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IAxis, SWIG_POINTER_NO_NULL | 0); @@ -40075,8 +39954,7 @@ fail: " Histogram2D::Histogram2D(int,double,double,int,double,double)\n" " Histogram2D::Histogram2D(int,std::vector< double,std::allocator< double > > const &,int,std::vector< double,std::allocator< double > > const &)\n" " Histogram2D::Histogram2D(IAxis const &,IAxis const &)\n" - " Histogram2D::Histogram2D(Powerfield< double > const &)\n" - " Histogram2D::Histogram2D(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >)\n"); + " Histogram2D::Histogram2D(Powerfield< double > const &)\n"); return 0; } @@ -42842,7 +42720,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IField_axis", _wrap_IField_axis, METH_VARARGS, "\n" "IField_axis(IField self, size_t serial_number) -> IAxis\n" - "const IAxis& IField::axis(size_t serial_number) const\n" + "const IAxis & IField::axis(size_t serial_number) const\n" "\n" "Returns axis with given serial number. \n" "\n" @@ -42868,7 +42746,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IField_getAxesValues", _wrap_IField_getAxesValues, METH_VARARGS, "\n" "IField_getAxesValues(IField self, size_t global_index) -> vdouble1d_t\n" - "std::vector<double> IField::getAxesValues(size_t global_index) const\n" + "std::vector< double > IField::getAxesValues(size_t global_index) const\n" "\n" "Returns values on all defined axes for given globalbin number\n" "\n" @@ -42902,7 +42780,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IField_getAxesBinIndices", _wrap_IField_getAxesBinIndices, METH_VARARGS, "\n" "IField_getAxesBinIndices(IField self, size_t global_index) -> vector_integer_t\n" - "std::vector<int> IField::getAxesBinIndices(size_t global_index) const\n" + "std::vector< int > IField::getAxesBinIndices(size_t global_index) const\n" "\n" "Returns vector of axes indices for given global index\n" "\n" @@ -43078,9 +42956,7 @@ static PyMethodDef SwigMethods[] = { { "IntensityData___imul__", _wrap_IntensityData___imul__, METH_VARARGS, "IntensityData___imul__(IntensityData self, IntensityData other) -> IntensityData"}, { "IntensityData_getValue", _wrap_IntensityData_getValue, METH_VARARGS, "\n" "IntensityData_getValue(IntensityData self, size_t index) -> double\n" - "double Powerfield< T >::getValue(size_t index) const\n" - "\n" - "Returns value or summed value, depending on T. \n" + "double Powerfield< double >::getValue(size_t index) const\n" "\n" ""}, { "IntensityData_getArray", _wrap_IntensityData_getArray, METH_O, "\n" @@ -43106,7 +42982,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IntensityData_normalizedToMaximum", _wrap_IntensityData_normalizedToMaximum, METH_O, "\n" "IntensityData_normalizedToMaximum(IntensityData self) -> IntensityData\n" - "const Powerfield<double>& Powerfield< T >::normalizedToMaximum()\n" + "const Powerfield< double > & Powerfield< double >::normalizedToMaximum()\n" "\n" ""}, { "IntensityData_swigregister", IntensityData_swigregister, METH_O, NULL}, @@ -44588,10 +44464,6 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "IHistogram_createHistogram", _wrap_IHistogram_createHistogram, METH_O, "IHistogram_createHistogram(IntensityData source) -> IHistogram"}, - { "IHistogram_createFrom", _wrap_IHistogram_createFrom, METH_VARARGS, "\n" - "IHistogram_createFrom(std::string const & filename) -> IHistogram\n" - "IHistogram_createFrom(vdouble2d_t data) -> IHistogram\n" - ""}, { "IHistogram_createPowerfield", _wrap_IHistogram_createPowerfield, METH_VARARGS, "\n" "IHistogram_createPowerfield(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> IntensityData\n" "Powerfield< double > * IHistogram::createPowerfield(DataType dataType=DataType::INTEGRAL) const\n" @@ -44719,18 +44591,19 @@ static PyMethodDef SwigMethods[] = { "Histogram2D(int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup)\n" "Histogram2D(int nbinsx, vdouble1d_t xbins, int nbinsy, vdouble1d_t ybins)\n" "Histogram2D(IAxis axis_x, IAxis axis_y)\n" - "Histogram2D(IntensityData data)\n" - "new_Histogram2D(vdouble2d_t data) -> Histogram2D\n" - "Histogram2D::Histogram2D(std::vector< std::vector< double >> data)\n" + "new_Histogram2D(IntensityData data) -> Histogram2D\n" + "Histogram2D::Histogram2D(const Powerfield< double > &data)\n" "\n" - "Constructor for 2D histograms from numpy array (thanks to swig) \n" + "Constructor for 2D histograms from basic Powerfield object. \n" "\n" ""}, { "Histogram2D_clone", _wrap_Histogram2D_clone, METH_O, "\n" "Histogram2D_clone(Histogram2D self) -> Histogram2D\n" "Histogram2D * Histogram2D::clone() const override\n" "\n" - "Returns clone of other histogram. \n" + "Constructor for 2D histograms from numpy array (thanks to swig)\n" + "\n" + "Returns clone of other histogram \n" "\n" ""}, { "Histogram2D_rank", _wrap_Histogram2D_rank, METH_O, "\n"