From b25aa91bd94ee8fe97c0617e48fff5f0e84efa4d Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 19 May 2022 14:48:28 +0200
Subject: [PATCH] correct 'dimensions' where it means 'sizes'

---
 Device/Data/DataUtils.cpp             |  4 +-
 Device/Data/LLData.h                  | 66 +++++++++++++--------------
 Device/Data/Powerfield.h              |  6 +--
 Device/Histo/IHistogram.cpp           | 10 ++--
 Device/Histo/IHistogram.h             |  2 +-
 Sim/Fitting/SimDataPair.cpp           |  6 +--
 Tests/Unit/Device/LLDataTest.cpp      | 22 ++++-----
 Tests/Unit/Device/PowerfieldTest.cpp  | 12 ++---
 auto/Wrap/doxygenDevice.i             | 10 ++--
 auto/Wrap/libBornAgainDevice.py       |  8 ++--
 auto/Wrap/libBornAgainDevice_wrap.cpp | 18 ++++----
 11 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/Device/Data/DataUtils.cpp b/Device/Data/DataUtils.cpp
index 1a9cbeb4bc8..8f00965d9dd 100644
--- a/Device/Data/DataUtils.cpp
+++ b/Device/Data/DataUtils.cpp
@@ -37,7 +37,7 @@ std::vector<std::vector<double>> FT2DArray(const std::vector<std::vector<double>
 double DataUtils::Data::relativeDataDifference(const Powerfield<double>& dat,
                                                const Powerfield<double>& ref)
 {
-    if (!dat.hasSameDimensions(ref))
+    if (!dat.hasSameSizes(ref))
         throw std::runtime_error("Powerfield dimension differs from reference");
 
     double diff = 0.0;
@@ -53,7 +53,7 @@ std::unique_ptr<Powerfield<double>>
 DataUtils::Data::createRelativeDifferenceData(const Powerfield<double>& data,
                                               const Powerfield<double>& reference)
 {
-    if (!data.hasSameDimensions(reference))
+    if (!data.hasSameSizes(reference))
         throw std::runtime_error("DataUtils::Data::createRelativeDifferenceData() -> "
                                  "Error. Different dimensions of data and reference.");
     std::unique_ptr<Powerfield<double>> result(reference.clone());
diff --git a/Device/Data/LLData.h b/Device/Data/LLData.h
index 694ccb35b41..5fc3d88468b 100644
--- a/Device/Data/LLData.h
+++ b/Device/Data/LLData.h
@@ -27,7 +27,7 @@ template <class T>
 class LLData {
 public:
     // construction, destruction and assignment
-    LLData(size_t rank, const int* dimensions);
+    LLData(size_t rank, const int* sizes);
     LLData(const LLData<T>& right);
     LLData<T>& operator=(const LLData<T>& right);
     ~LLData();
@@ -50,19 +50,19 @@ public:
     // retrieve basic info
     size_t getTotalSize() const;
     inline size_t rank() const { return m_rank; }
-    const int* dimensions() const { return m_dims; }
+    const int* sizes() const { return m_sizes; }
     T getTotalSum() const;
     T max() const;
 
 private:
-    void allocate(size_t rank, const int* dimensions);
+    void allocate(size_t rank, const int* sizes);
     void clear();
-    bool checkDimensions(size_t rank, const int* dimensions) const;
+    bool checkSizes(size_t rank, const int* sizes) const;
     void swapContents(LLData<T>& other);
     T getZeroElement() const;
 
     size_t m_rank;
-    int* m_dims;
+    int* m_sizes;
     T* m_data_array;
 };
 
@@ -80,24 +80,24 @@ LLData<T> operator/(const LLData<T>& left, const LLData<T>& right);
 
 // Global helper functions for comparison
 template <class T>
-bool HaveSameDimensions(const LLData<T>& left, const LLData<T>& right);
+bool HaveSameSizes(const LLData<T>& left, const LLData<T>& right);
 
 template <class T>
-inline LLData<T>::LLData(size_t rank, const int* dimensions)
+inline LLData<T>::LLData(size_t rank, const int* sizes)
     : m_rank(0)
-    , m_dims(nullptr)
+    , m_sizes(nullptr)
     , m_data_array(0)
 {
-    allocate(rank, dimensions);
+    allocate(rank, sizes);
 }
 
 template <class T>
 LLData<T>::LLData(const LLData<T>& right)
     : m_rank(0)
-    , m_dims(nullptr)
+    , m_sizes(nullptr)
     , m_data_array(0)
 {
-    allocate(right.rank(), right.dimensions());
+    allocate(right.rank(), right.sizes());
     for (size_t i = 0; i < getTotalSize(); ++i)
         m_data_array[i] = right[i];
 }
@@ -133,9 +133,9 @@ inline const T& LLData<T>::operator[](size_t i) const
 template <class T>
 LLData<T>& LLData<T>::operator+=(const LLData<T>& right)
 {
-    if (!HaveSameDimensions(*this, right))
+    if (!HaveSameSizes(*this, right))
         throw std::runtime_error(
-            "Operation += on LLData requires both operands to have the same dimensions");
+            "Operation += on LLData requires both operands to have the same sizes");
     for (size_t i = 0; i < getTotalSize(); ++i)
         m_data_array[i] += right[i];
     return *this;
@@ -144,9 +144,9 @@ LLData<T>& LLData<T>::operator+=(const LLData<T>& right)
 template <class T>
 LLData<T>& LLData<T>::operator-=(const LLData& right)
 {
-    if (!HaveSameDimensions(*this, right))
+    if (!HaveSameSizes(*this, right))
         throw std::runtime_error(
-            "Operation -= on LLData requires both operands to have the same dimensions");
+            "Operation -= on LLData requires both operands to have the same sizes");
     for (size_t i = 0; i < getTotalSize(); ++i)
         m_data_array[i] -= right[i];
     return *this;
@@ -155,9 +155,9 @@ LLData<T>& LLData<T>::operator-=(const LLData& right)
 template <class T>
 LLData<T>& LLData<T>::operator*=(const LLData& right)
 {
-    if (!HaveSameDimensions(*this, right))
+    if (!HaveSameSizes(*this, right))
         throw std::runtime_error(
-            "Operation *= on LLData requires both operands to have the same dimensions");
+            "Operation *= on LLData requires both operands to have the same sizes");
     for (size_t i = 0; i < getTotalSize(); ++i)
         m_data_array[i] *= right[i];
     return *this;
@@ -166,9 +166,9 @@ LLData<T>& LLData<T>::operator*=(const LLData& right)
 template <class T>
 LLData<T>& LLData<T>::operator/=(const LLData& right)
 {
-    if (!HaveSameDimensions(*this, right))
+    if (!HaveSameSizes(*this, right))
         throw std::runtime_error(
-            "Operation /= on LLData requires both operands to have the same dimensions");
+            "Operation /= on LLData requires both operands to have the same sizes");
     for (size_t i = 0; i < getTotalSize(); ++i) {
         double ratio;
         if (std::abs(m_data_array[i] - right[i])
@@ -192,7 +192,7 @@ void LLData<T>::setAll(const T& value)
 template <class T>
 inline size_t LLData<T>::getTotalSize() const
 {
-    int result = std::accumulate(m_dims, m_dims + m_rank, 1, std::multiplies<int>{});
+    int result = std::accumulate(m_sizes, m_sizes + m_rank, 1, std::multiplies<int>{});
     return static_cast<size_t>(result);
 }
 
@@ -209,16 +209,16 @@ T LLData<T>::max() const
 }
 
 template <class T>
-void LLData<T>::allocate(size_t rank, const int* dimensions)
+void LLData<T>::allocate(size_t rank, const int* sizes)
 {
     clear();
-    if (!checkDimensions(rank, dimensions))
-        throw std::runtime_error("LLData<T>::allocate error: dimensions must be > 0");
+    if (!checkSizes(rank, sizes))
+        throw std::runtime_error("LLData<T>::allocate error: sizes must be > 0");
 
     m_rank = rank;
     if (m_rank) {
-        m_dims = new int[m_rank];
-        std::copy(dimensions, dimensions + rank, m_dims);
+        m_sizes = new int[m_rank];
+        std::copy(sizes, sizes + rank, m_sizes);
         m_data_array = new T[getTotalSize()];
     } else {
         m_data_array = new T[1];
@@ -231,18 +231,18 @@ void LLData<T>::clear()
     if (m_rank > 0) {
         m_rank = 0;
         delete[] m_data_array;
-        delete[] m_dims;
+        delete[] m_sizes;
         m_data_array = nullptr;
-        m_dims = nullptr;
+        m_sizes = nullptr;
     } else {
         delete[] m_data_array;
     }
 }
 
 template <class T>
-inline bool LLData<T>::checkDimensions(size_t rank, const int* dimensions) const
+inline bool LLData<T>::checkSizes(size_t rank, const int* sizes) const
 {
-    return std::all_of(dimensions, dimensions + rank,
+    return std::all_of(sizes, sizes + rank,
                        [](const int& dim) -> bool { return dim > 0; });
 }
 
@@ -250,7 +250,7 @@ template <class T>
 void LLData<T>::swapContents(LLData<T>& other)
 {
     std::swap(this->m_rank, other.m_rank);
-    std::swap(this->m_dims, other.m_dims);
+    std::swap(this->m_sizes, other.m_sizes);
     std::swap(this->m_data_array, other.m_data_array);
 }
 
@@ -294,12 +294,12 @@ LLData<T> operator/(const LLData<T>& left, const LLData<T>& right)
 }
 
 template <class T>
-bool HaveSameDimensions(const LLData<T>& left, const LLData<T>& right)
+bool HaveSameSizes(const LLData<T>& left, const LLData<T>& right)
 {
     if (left.rank() != right.rank())
         return false;
-    const int* ldims = left.dimensions();
-    const int* rdims = right.dimensions();
+    const int* ldims = left.sizes();
+    const int* rdims = right.sizes();
     for (size_t i = 0; i < left.rank(); ++i) {
         if (ldims[i] != rdims[i])
             return false;
diff --git a/Device/Data/Powerfield.h b/Device/Data/Powerfield.h
index 34f48faf475..6931a603313 100644
--- a/Device/Data/Powerfield.h
+++ b/Device/Data/Powerfield.h
@@ -138,7 +138,7 @@ public:
 
     //! Returns true if object have same dimensions and number of axes bins
     template <class U>
-    bool hasSameDimensions(const Powerfield<U>& other) const;
+    bool hasSameSizes(const Powerfield<U>& other) const;
 
     //! Returns true if objects a) have same dimensions b) bin boundaries of axes coincide
     template <class U>
@@ -369,7 +369,7 @@ inline void Powerfield<T>::setRawDataArray(const T* source)
 //! Returns true if object have same dimensions
 template <class T>
 template <class U>
-inline bool Powerfield<T>::hasSameDimensions(const Powerfield<U>& other) const
+inline bool Powerfield<T>::hasSameSizes(const Powerfield<U>& other) const
 {
     if (!isInitialized())
         return false;
@@ -388,7 +388,7 @@ template <class T>
 template <class U>
 bool Powerfield<T>::hasSameShape(const Powerfield<U>& other) const
 {
-    if (!hasSameDimensions(other))
+    if (!hasSameSizes(other))
         return false;
 
     for (size_t i = 0; i < m_axes.size(); ++i)
diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp
index 796e22e9057..19cbb3d0f47 100644
--- a/Device/Histo/IHistogram.cpp
+++ b/Device/Histo/IHistogram.cpp
@@ -311,7 +311,7 @@ std::vector<double> IHistogram::getDataVector(IHistogram::DataType dataType) con
 //! Copy content (but not the axes) from other histogram. Dimensions should be the same.
 void IHistogram::copyContentFrom(const IHistogram& other)
 {
-    if (!hasSameDimensions(other))
+    if (!hasSameSizes(other))
         throw std::runtime_error(
             "IHistogram::copyContentFrom() -> Error. Can't copy the data of different shape.");
     reset();
@@ -333,14 +333,14 @@ bool IHistogram::hasSameShape(const IHistogram& other) const
     return m_data->hasSameShape(*other.m_data);
 }
 
-bool IHistogram::hasSameDimensions(const IHistogram& other) const
+bool IHistogram::hasSameSizes(const IHistogram& other) const
 {
-    return m_data->hasSameDimensions(*other.m_data);
+    return m_data->hasSameSizes(*other.m_data);
 }
 
 const IHistogram& IHistogram::operator+=(const IHistogram& right)
 {
-    if (!hasSameDimensions(right))
+    if (!hasSameSizes(right))
         throw std::runtime_error(
             "IHistogram::operator+=() -> Error. Histograms have different dimension");
     for (size_t i = 0; i < getTotalNumberOfBins(); ++i)
@@ -350,7 +350,7 @@ const IHistogram& IHistogram::operator+=(const IHistogram& right)
 
 IHistogram* IHistogram::relativeDifferenceHistogram(const IHistogram& rhs) const
 {
-    if (!hasSameDimensions(rhs))
+    if (!hasSameSizes(rhs))
         throw std::runtime_error("IHistogram::relativeDifferenceHistogram() -> Error. "
                                  "Histograms have different dimensions");
 
diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h
index 0e0bf972108..32b758e5fcb 100644
--- a/Device/Histo/IHistogram.h
+++ b/Device/Histo/IHistogram.h
@@ -163,7 +163,7 @@ public:
     bool hasSameShape(const IHistogram& other) const;
 
     //! Returns true if object have same rank and number of axes bins
-    bool hasSameDimensions(const IHistogram& other) const;
+    bool hasSameSizes(const IHistogram& other) const;
 
     //! Addition-assignment operator for two histograms.
     const IHistogram& operator+=(const IHistogram& right);
diff --git a/Sim/Fitting/SimDataPair.cpp b/Sim/Fitting/SimDataPair.cpp
index c60b3e00f18..ec549620681 100644
--- a/Sim/Fitting/SimDataPair.cpp
+++ b/Sim/Fitting/SimDataPair.cpp
@@ -39,7 +39,7 @@ std::unique_ptr<Powerfield<double>> initUserWeights(const Powerfield<double>& sh
     return result;
 }
 
-bool haveSameDimensions(const IDetector& detector, const Powerfield<double>& data)
+bool haveSameSizes(const IDetector& detector, const Powerfield<double>& data)
 {
     if (data.rank() != detector.dimension())
         return false;
@@ -60,12 +60,12 @@ SimulationResult convertData(const ISimulation& simulation, const Powerfield<dou
     const ICoordSystem* coordSystem = simulation.createCoordSystem();
     auto roi_data = coordSystem->createPowerfield(coordSystem->defaultUnits());
 
-    if (roi_data->hasSameDimensions(data)) {
+    if (roi_data->hasSameSizes(data)) {
         // data is already cropped to ROI
         simulation.detector().iterateOverNonMaskedPoints([&](IDetector::const_iterator it) {
             (*roi_data)[it.roiIndex()] = data[it.roiIndex()];
         });
-    } else if (haveSameDimensions(simulation.detector(), data)) {
+    } else if (haveSameSizes(simulation.detector(), data)) {
         // experimental data has same shape as the detector, we have to copy the original
         // data to a smaller roi map
         simulation.detector().iterateOverNonMaskedPoints([&](IDetector::const_iterator it) {
diff --git a/Tests/Unit/Device/LLDataTest.cpp b/Tests/Unit/Device/LLDataTest.cpp
index 07db42bb22e..26b2ed094dd 100644
--- a/Tests/Unit/Device/LLDataTest.cpp
+++ b/Tests/Unit/Device/LLDataTest.cpp
@@ -73,25 +73,25 @@ TEST_F(LLDataTest, TotalSum)
 
 TEST_F(LLDataTest, GetDimensions)
 {
-    EXPECT_EQ(int_data_0d->dimensions(), (int*)nullptr);
-    EXPECT_EQ(fl_data_1d->dimensions()[0], 10);
-    EXPECT_EQ(db_data_3d->dimensions()[1], 15);
+    EXPECT_EQ(int_data_0d->sizes(), (int*)nullptr);
+    EXPECT_EQ(fl_data_1d->sizes()[0], 10);
+    EXPECT_EQ(db_data_3d->sizes()[1], 15);
 }
 
 TEST_F(LLDataTest, DataCopyingConstructor)
 {
     auto* other_int_data_0d = new LLData<int>(*int_data_0d);
-    EXPECT_TRUE(HaveSameDimensions(*int_data_0d, *other_int_data_0d));
+    EXPECT_TRUE(HaveSameSizes(*int_data_0d, *other_int_data_0d));
 
     fl_data_1d->setAll(1.2);
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
-    EXPECT_TRUE(HaveSameDimensions(*fl_data_1d, *other_fl_data_1d));
+    EXPECT_TRUE(HaveSameSizes(*fl_data_1d, *other_fl_data_1d));
     EXPECT_FLOAT_EQ((*other_fl_data_1d)[0], 1.2f);
     EXPECT_FLOAT_EQ(fl_data_1d->getTotalSum(), other_fl_data_1d->getTotalSum());
 
     db_data_3d->setAll(1.17);
     auto* other_db_data_3d = new LLData<double>(*db_data_3d);
-    EXPECT_TRUE(HaveSameDimensions(*db_data_3d, *other_db_data_3d));
+    EXPECT_TRUE(HaveSameSizes(*db_data_3d, *other_db_data_3d));
     EXPECT_DOUBLE_EQ((*other_db_data_3d)[10], 1.17);
     EXPECT_DOUBLE_EQ(db_data_3d->getTotalSum(), other_db_data_3d->getTotalSum());
 
@@ -237,7 +237,7 @@ TEST_F(LLDataTest, Division)
     delete other_db_data_3d;
 }
 
-TEST_F(LLDataTest, HaveSameDimensions)
+TEST_F(LLDataTest, HaveSameSizes)
 {
     auto* odim0 = new int[0];
 
@@ -253,13 +253,13 @@ TEST_F(LLDataTest, HaveSameDimensions)
     auto* other_fl_data_1d = new LLData<float>(1u, odim1);
     auto* other_db_data_3d = new LLData<double>(3u, odim3);
 
-    EXPECT_TRUE(HaveSameDimensions(*int_data_0d, *other_int_data_0d));
-    EXPECT_TRUE(HaveSameDimensions(*fl_data_1d, *other_fl_data_1d));
-    EXPECT_TRUE(HaveSameDimensions(*db_data_3d, *other_db_data_3d));
+    EXPECT_TRUE(HaveSameSizes(*int_data_0d, *other_int_data_0d));
+    EXPECT_TRUE(HaveSameSizes(*fl_data_1d, *other_fl_data_1d));
+    EXPECT_TRUE(HaveSameSizes(*db_data_3d, *other_db_data_3d));
 
     odim3[1] = 25;
     auto* some_other_db_data_3d = new LLData<double>(3u, odim3);
-    EXPECT_FALSE(HaveSameDimensions(*db_data_3d, *some_other_db_data_3d));
+    EXPECT_FALSE(HaveSameSizes(*db_data_3d, *some_other_db_data_3d));
 
     delete other_int_data_0d;
     delete other_fl_data_1d;
diff --git a/Tests/Unit/Device/PowerfieldTest.cpp b/Tests/Unit/Device/PowerfieldTest.cpp
index 93a71770640..57dc0edfc4a 100644
--- a/Tests/Unit/Device/PowerfieldTest.cpp
+++ b/Tests/Unit/Device/PowerfieldTest.cpp
@@ -41,23 +41,23 @@ TEST_F(PowerfieldTest, DataCopying)
     Powerfield<double> data2(FixedBinAxis("axis0", 10, 0., 10.),
                              FixedBinAxis("axis1", 10, 1., 10.));
 
-    EXPECT_TRUE(data1.hasSameDimensions(data2));
+    EXPECT_TRUE(data1.hasSameSizes(data2));
     EXPECT_FALSE(data1.hasSameShape(data2));
 
     data2.copyFrom(data1);
-    EXPECT_TRUE(data1.hasSameDimensions(data2));
+    EXPECT_TRUE(data1.hasSameSizes(data2));
     EXPECT_TRUE(data1.hasSameShape(data2));
 
     data1.setAllTo(10);
     data2.copyFrom(data1);
     EXPECT_TRUE(data1.totalSum() == data2.totalSum());
-    EXPECT_TRUE(data1.hasSameDimensions(data2));
+    EXPECT_TRUE(data1.hasSameSizes(data2));
     EXPECT_TRUE(data1.hasSameShape(data2));
-    EXPECT_TRUE(data2.hasSameDimensions(data1));
+    EXPECT_TRUE(data2.hasSameSizes(data1));
     EXPECT_TRUE(data2.hasSameShape(data1));
-    EXPECT_TRUE(data1.hasSameDimensions(data1));
+    EXPECT_TRUE(data1.hasSameSizes(data1));
     EXPECT_TRUE(data1.hasSameShape(data1));
-    EXPECT_TRUE(data2.hasSameDimensions(data2));
+    EXPECT_TRUE(data2.hasSameSizes(data2));
     EXPECT_TRUE(data2.hasSameShape(data2));
 }
 
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index b44620d87cd..42f5bc32f74 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -1425,7 +1425,7 @@ creates new  Powerfield with histogram's shape and put there values correspondin
 Returns true if objects a) have same dimensions b) bin boundaries of axes coincide. 
 ";
 
-%feature("docstring")  IHistogram::hasSameDimensions "bool IHistogram::hasSameDimensions(const IHistogram &other) const
+%feature("docstring")  IHistogram::hasSameSizes "bool IHistogram::hasSameSizes(const IHistogram &other) const
 
 Returns true if object have same rank and number of axes bins. 
 ";
@@ -1665,7 +1665,7 @@ Template class to store data of any type in multi-dimensional space (low-level).
 C++ includes: LLData.h
 ";
 
-%feature("docstring")  LLData::LLData "LLData< T >::LLData(size_t rank, const int *dimensions)
+%feature("docstring")  LLData::LLData "LLData< T >::LLData(size_t rank, const int *sizes)
 ";
 
 %feature("docstring")  LLData::LLData "LLData< T >::LLData(const LLData< T > &right)
@@ -1686,7 +1686,7 @@ C++ includes: LLData.h
 %feature("docstring")  LLData::rank "size_t LLData< T >::rank() const
 ";
 
-%feature("docstring")  LLData::dimensions "const int* LLData< T >::dimensions() const
+%feature("docstring")  LLData::sizes "const int* LLData< T >::sizes() const
 ";
 
 %feature("docstring")  LLData::getTotalSum "T LLData< T >::getTotalSum() const
@@ -1947,7 +1947,7 @@ Sets new values to raw data array.
 Returns value or summed value, depending on T. 
 ";
 
-%feature("docstring")  Powerfield::hasSameDimensions "bool Powerfield< T >::hasSameDimensions(const Powerfield< U > &other) const
+%feature("docstring")  Powerfield::hasSameSizes "bool Powerfield< T >::hasSameSizes(const Powerfield< U > &other) const
 
 Returns true if object have same dimensions and number of axes bins.
 
@@ -2860,7 +2860,7 @@ Returns true if data in both files agree.
 
 
 // File: LLData_8h.xml
-%feature("docstring")  HaveSameDimensions "bool HaveSameDimensions(const LLData< T > &left, const LLData< T > &right)
+%feature("docstring")  HaveSameSizes "bool HaveSameSizes(const LLData< T > &left, const LLData< T > &right)
 ";
 
 
diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py
index 52a13c7d06d..2053d24d0c8 100644
--- a/auto/Wrap/libBornAgainDevice.py
+++ b/auto/Wrap/libBornAgainDevice.py
@@ -4740,15 +4740,15 @@ class IHistogram(object):
         """
         return _libBornAgainDevice.IHistogram_hasSameShape(self, other)
 
-    def hasSameDimensions(self, other):
+    def hasSameSizes(self, other):
         r"""
-        hasSameDimensions(IHistogram self, IHistogram other) -> bool
-        bool IHistogram::hasSameDimensions(const IHistogram &other) const
+        hasSameSizes(IHistogram self, IHistogram other) -> bool
+        bool IHistogram::hasSameSizes(const IHistogram &other) const
 
         Returns true if object have same rank and number of axes bins. 
 
         """
-        return _libBornAgainDevice.IHistogram_hasSameDimensions(self, other)
+        return _libBornAgainDevice.IHistogram_hasSameSizes(self, other)
 
     def __iadd__(self, right):
         r"""__iadd__(IHistogram self, IHistogram right) -> IHistogram"""
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index bfffd6d0aaa..349f0d478d6 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -38181,7 +38181,7 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IHistogram_hasSameDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_IHistogram_hasSameSizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IHistogram *arg1 = (IHistogram *) 0 ;
   IHistogram *arg2 = 0 ;
@@ -38192,21 +38192,21 @@ SWIGINTERN PyObject *_wrap_IHistogram_hasSameDimensions(PyObject *SWIGUNUSEDPARM
   PyObject *swig_obj[2] ;
   bool result;
   
-  if (!SWIG_Python_UnpackTuple(args, "IHistogram_hasSameDimensions", 2, 2, swig_obj)) SWIG_fail;
+  if (!SWIG_Python_UnpackTuple(args, "IHistogram_hasSameSizes", 2, 2, swig_obj)) SWIG_fail;
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_hasSameDimensions" "', argument " "1"" of type '" "IHistogram const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_hasSameSizes" "', argument " "1"" of type '" "IHistogram const *""'"); 
   }
   arg1 = reinterpret_cast< IHistogram * >(argp1);
   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IHistogram,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IHistogram_hasSameDimensions" "', argument " "2"" of type '" "IHistogram const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IHistogram_hasSameSizes" "', argument " "2"" of type '" "IHistogram const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_hasSameDimensions" "', argument " "2"" of type '" "IHistogram const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IHistogram_hasSameSizes" "', argument " "2"" of type '" "IHistogram const &""'"); 
   }
   arg2 = reinterpret_cast< IHistogram * >(argp2);
-  result = (bool)((IHistogram const *)arg1)->hasSameDimensions((IHistogram const &)*arg2);
+  result = (bool)((IHistogram const *)arg1)->hasSameSizes((IHistogram const &)*arg2);
   resultobj = SWIG_From_bool(static_cast< bool >(result));
   return resultobj;
 fail:
@@ -43592,9 +43592,9 @@ static PyMethodDef SwigMethods[] = {
 		"Returns true if objects a) have same dimensions b) bin boundaries of axes coincide. \n"
 		"\n"
 		""},
-	 { "IHistogram_hasSameDimensions", _wrap_IHistogram_hasSameDimensions, METH_VARARGS, "\n"
-		"IHistogram_hasSameDimensions(IHistogram self, IHistogram other) -> bool\n"
-		"bool IHistogram::hasSameDimensions(const IHistogram &other) const\n"
+	 { "IHistogram_hasSameSizes", _wrap_IHistogram_hasSameSizes, METH_VARARGS, "\n"
+		"IHistogram_hasSameSizes(IHistogram self, IHistogram other) -> bool\n"
+		"bool IHistogram::hasSameSizes(const IHistogram &other) const\n"
 		"\n"
 		"Returns true if object have same rank and number of axes bins. \n"
 		"\n"
-- 
GitLab