Repository: scikit-hep/uproot5

Issue:
Values read from TH2* are mixed up
It appears that something is going wrong with reading TH2* histograms compared to ROOT or uproot3. When reading a TH2, the second axis values seem to be reversed, as well as the over and underflow next to each other. I can reproduce it (see below), and it seems like it should be straightforward, but somehow I haven't yet found the source.

```python
from pathlib import Path
filename = Path("reproducer.root")
if not filename.exists():
    import ROOT
    # Fill to create an identity, but with different number of bins to ensure that we don't accidentally get it right.
    h = ROOT.TH2D("test", "test", 10, 0, 10, 12, 0, 12)
    for i in range(0, 10):
        h.Fill(i + 0.5, i + 0.5)

    f_out = ROOT.TFile("reproducer.root", "RECREATE")
    h.Write()
    f_out.Close()

import uproot4
import uproot as uproot3
import numpy as np

hist_3 = uproot3.open("reproducer.root")[b"test"]
hist_4 = uproot4.open("reproducer.root")["test"]

# Ignore overflow for now since uproot3.values ignores overflow
np.testing.assert_allclose(hist_3.values, hist_4.values()[1:-1, 1:-1])
```

this gives:

```
AssertionError:
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 19 / 120 (15.8%)
Max absolute difference: 1.
Max relative difference: 1.
 x: array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.],...
 y: array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],...
```

Just printing all of the values gives some info. Expected from uproot3 (note: excluding flow bins):

```python
>>> print(hist_3.values)
[[1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]]
```

Uproot4 (note: including flow bins and the reverse):

```python
>>> print(hist_4.values()[:, ::-1])
[[1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]
```

Any help is appreciated!


Discussion:
The code is in

https://github.com/scikit-hep/uproot4/blob/a5a2b1f7d8b50c7f0a85d53f271149b0e4317b67/uproot4/behaviors/TH2.py#L24-L53

and the interface is still under discussion with @HDembinski and @henryiii. In fact, on the latter point, I don't know where we landed, but I'm willing to make this interface align with boost-histogram and hist, if those interfaces have settled (#50 and scikit-hep/uproot#502).

So @raymondEhlers, what you find in the linked code is basically a sketch: it can and should be changed to fit your expectations. The `to_numpy`, `to_boost`, and `to_hist` methods (and I've been reminded that we need a `to_pandas`, #91) all use the `edges`, `values`, and `values_errors` (which maybe needs to become `values_variances`). Some hidden helper functions are in the TH1.py file:

https://github.com/scikit-hep/uproot4/blob/a5a2b1f7d8b50c7f0a85d53f271149b0e4317b67/uproot4/behaviors/TH1.py#L16-L63

I think I tested the 2D histogram by looking at a Gaussian blob with the same number of bins in X and Y, which would hide the kinds of transposition issues you're seeing (but it's a file I had available). If you see how to correct it with an application in mind, please do.
Thanks for the pointers and your detailed answer Jim!

Perhaps my word choice was not great - I found the TH1 and TH2 behaviors and looked around the code, but was a bit confused as to how reading the hist correctly could lead to appearing to move the flow bins. However, looking more closely this morning, I realized that it's actually just a reshape with the wrong parameters. So it should be a straightforward change. I'll make a PR either later today or tomorrow.

Thanks!

Resolving patch:
diff --git a/uproot4/behaviors/TH2.py b/uproot4/behaviors/TH2.py
--- a/uproot4/behaviors/TH2.py
+++ b/uproot4/behaviors/TH2.py
@@ -35,15 +35,15 @@ def values(self):
 
         xaxis_fNbins = self.member("fXaxis").member("fNbins")
         yaxis_fNbins = self.member("fYaxis").member("fNbins")
-        return values.reshape(xaxis_fNbins + 2, yaxis_fNbins + 2)
+        return numpy.transpose(values.reshape(yaxis_fNbins + 2, xaxis_fNbins + 2))
 
     def values_errors(self):
         values = self.values()
-        errors = numpy.zeros(values.shape, dtype=numpy.float64)
+        errors = numpy.transpose(numpy.zeros(values.shape[::-1], dtype=numpy.float64))
 
         sumw2 = self.member("fSumw2", none_if_missing=True)
         if sumw2 is not None and len(sumw2) == self.member("fNcells"):
-            sumw2 = numpy.reshape(sumw2, values.shape)
+            sumw2 = numpy.transpose(numpy.reshape(sumw2, values.shape[::-1]))
             positive = sumw2 > 0
             errors[positive] = numpy.sqrt(sumw2[positive])
         else:
diff --git a/uproot4/behaviors/TH3.py b/uproot4/behaviors/TH3.py
--- a/uproot4/behaviors/TH3.py
+++ b/uproot4/behaviors/TH3.py
@@ -38,15 +38,17 @@ def values(self):
         xaxis_fNbins = self.member("fXaxis").member("fNbins")
         yaxis_fNbins = self.member("fYaxis").member("fNbins")
         zaxis_fNbins = self.member("fZaxis").member("fNbins")
-        return values.reshape(xaxis_fNbins + 2, yaxis_fNbins + 2, zaxis_fNbins + 2)
+        return numpy.transpose(
+            values.reshape(zaxis_fNbins + 2, yaxis_fNbins + 2, xaxis_fNbins + 2)
+        )
 
     def values_errors(self):
         values = self.values()
-        errors = numpy.zeros(values.shape, dtype=numpy.float64)
+        errors = numpy.transpose(numpy.zeros(values.shape[::-1], dtype=numpy.float64))
 
         sumw2 = self.member("fSumw2", none_if_missing=True)
         if sumw2 is not None and len(sumw2) == self.member("fNcells"):
-            sumw2 = numpy.reshape(sumw2, values.shape)
+            sumw2 = numpy.transpose(numpy.reshape(sumw2, values.shape[::-1]))
             positive = sumw2 > 0
             errors[positive] = numpy.sqrt(sumw2[positive])
         else:


Test patch:
diff --git a/tests/test_0046-histograms-bh-hist.py b/tests/test_0046-histograms-bh-hist.py
--- a/tests/test_0046-histograms-bh-hist.py
+++ b/tests/test_0046-histograms-bh-hist.py
@@ -248,6 +248,8 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                1.0,
+                0.0,
                 0.0,
                 1.0,
                 0.0,
@@ -255,12 +257,10 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
-                1.0,
                 0.0,
-                2.0,
-                1.0,
+                0.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -293,10 +293,10 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                2.0,
-                0.0,
                 0.0,
+                1.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -306,7 +306,7 @@ def test_numpy_2d():
                 0.0,
                 1.0,
                 0.0,
-                0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -335,14 +335,14 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
-                0.0,
-                0.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
+                1.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -381,20 +381,20 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                2.0,
                 1.0,
-                2.0,
-                2.0,
+                0.0,
                 0.0,
                 1.0,
                 0.0,
                 2.0,
+                4.0,
+                1.0,
                 0.0,
-                0.0,
-                0.0,
-                0.0,
+                2.0,
+                1.0,
                 1.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -419,25 +419,25 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
-                3.0,
-                1.0,
-                0.0,
-                1.0,
-                2.0,
                 1.0,
                 0.0,
                 1.0,
                 1.0,
                 1.0,
                 2.0,
-                1.0,
+                0.0,
+                2.0,
                 2.0,
-                3.0,
                 0.0,
                 1.0,
                 1.0,
+                2.0,
+                2.0,
+                0.0,
                 1.0,
+                5.0,
+                2.0,
+                0.0,
                 1.0,
                 0.0,
                 0.0,
@@ -460,34 +460,34 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
                 1.0,
                 0.0,
+                0.0,
                 1.0,
-                2.0,
                 0.0,
                 2.0,
-                4.0,
-                2.0,
-                5.0,
-                2.0,
+                0.0,
                 2.0,
                 1.0,
-                5.0,
                 3.0,
                 4.0,
+                3.0,
                 4.0,
-                1.0,
                 4.0,
+                3.0,
+                3.0,
+                6.0,
                 1.0,
-                2.0,
+                0.0,
                 1.0,
-                2.0,
+                1.0,
+                1.0,
+                0.0,
                 1.0,
                 0.0,
                 0.0,
                 1.0,
-                2.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -506,33 +506,33 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
-                3.0,
+                0.0,
                 1.0,
-                6.0,
                 1.0,
-                3.0,
-                6.0,
-                3.0,
-                6.0,
-                9.0,
-                6.0,
-                9.0,
+                4.0,
+                1.0,
+                4.0,
                 5.0,
                 2.0,
+                7.0,
+                7.0,
+                9.0,
+                13.0,
+                10.0,
                 4.0,
+                3.0,
+                3.0,
                 4.0,
-                1.0,
                 6.0,
-                1.0,
-                2.0,
-                0.0,
-                1.0,
-                1.0,
+                3.0,
                 1.0,
                 1.0,
                 0.0,
+                3.0,
+                0.0,
+                0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -546,36 +546,36 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
-                2.0,
+                0.0,
                 0.0,
                 0.0,
                 3.0,
-                4.0,
-                5.0,
-                5.0,
-                6.0,
+                3.0,
+                2.0,
                 9.0,
-                17.0,
+                4.0,
                 8.0,
+                7.0,
+                8.0,
+                10.0,
+                17.0,
+                10.0,
                 13.0,
-                13.0,
-                14.0,
-                11.0,
-                13.0,
+                17.0,
+                17.0,
+                9.0,
+                12.0,
+                1.0,
                 6.0,
-                10.0,
-                5.0,
-                4.0,
-                5.0,
                 7.0,
                 2.0,
                 1.0,
+                1.0,
+                2.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -590,36 +590,36 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
-                0.0,
-                0.0,
                 1.0,
+                0.0,
+                2.0,
                 1.0,
-                4.0,
-                4.0,
-                5.0,
-                11.0,
+                0.0,
+                2.0,
+                2.0,
                 7.0,
-                8.0,
+                7.0,
+                11.0,
+                12.0,
                 13.0,
-                17.0,
                 16.0,
-                28.0,
+                25.0,
                 16.0,
-                22.0,
-                24.0,
-                22.0,
                 18.0,
-                17.0,
-                10.0,
-                6.0,
+                21.0,
+                22.0,
+                20.0,
+                19.0,
+                9.0,
+                9.0,
+                16.0,
+                7.0,
+                3.0,
                 4.0,
-                8.0,
                 6.0,
-                1.0,
-                1.0,
-                1.0,
+                2.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -635,33 +635,32 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
-                0.0,
-                0.0,
-                5.0,
                 1.0,
-                6.0,
-                9.0,
-                9.0,
-                22.0,
+                5.0,
+                4.0,
+                7.0,
+                5.0,
+                12.0,
+                5.0,
                 16.0,
-                20.0,
-                29.0,
-                33.0,
+                23.0,
+                28.0,
+                28.0,
+                25.0,
+                37.0,
+                41.0,
+                41.0,
+                27.0,
+                24.0,
                 21.0,
-                35.0,
-                34.0,
                 19.0,
-                32.0,
-                30.0,
-                28.0,
-                17.0,
-                14.0,
-                8.0,
+                16.0,
+                15.0,
                 11.0,
                 4.0,
-                2.0,
-                2.0,
+                4.0,
                 2.0,
                 1.0,
                 0.0,
@@ -671,49 +670,50 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                0.0,
             ],
             [
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
+                0.0,
                 1.0,
                 0.0,
-                3.0,
-                2.0,
+                0.0,
                 4.0,
+                1.0,
                 6.0,
-                11.0,
-                10.0,
-                18.0,
-                20.0,
-                34.0,
-                39.0,
+                6.0,
+                14.0,
+                14.0,
+                21.0,
+                26.0,
+                46.0,
                 42.0,
-                51.0,
                 47.0,
-                68.0,
-                60.0,
+                52.0,
+                44.0,
+                51.0,
+                53.0,
                 41.0,
-                47.0,
-                37.0,
-                43.0,
-                27.0,
-                22.0,
-                15.0,
-                16.0,
-                11.0,
-                4.0,
+                56.0,
+                30.0,
+                24.0,
+                19.0,
+                20.0,
+                21.0,
+                12.0,
+                8.0,
                 1.0,
-                0.0,
+                2.0,
                 3.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
             ],
             [
@@ -721,38 +721,38 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
-                0.0,
-                1.0,
                 3.0,
                 2.0,
-                7.0,
+                3.0,
+                3.0,
+                4.0,
                 6.0,
+                11.0,
                 8.0,
-                21.0,
-                23.0,
-                44.0,
-                53.0,
-                60.0,
-                73.0,
+                20.0,
+                36.0,
+                47.0,
+                40.0,
+                49.0,
+                61.0,
+                61.0,
+                70.0,
+                87.0,
                 95.0,
-                82.0,
-                68.0,
-                86.0,
-                88.0,
-                72.0,
+                90.0,
+                74.0,
+                62.0,
                 66.0,
-                52.0,
-                40.0,
-                28.0,
-                27.0,
-                15.0,
-                17.0,
-                8.0,
-                6.0,
-                4.0,
+                50.0,
+                42.0,
+                24.0,
+                14.0,
+                16.0,
+                7.0,
+                7.0,
                 2.0,
-                1.0,
+                0.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -766,525 +766,481 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 1.0,
-                2.0,
+                0.0,
                 1.0,
-                2.0,
-                7.0,
+                4.0,
                 5.0,
-                14.0,
-                20.0,
+                9.0,
+                10.0,
+                21.0,
                 28.0,
-                32.0,
-                57.0,
-                58.0,
-                74.0,
-                93.0,
-                93.0,
-                106.0,
-                95.0,
-                129.0,
-                126.0,
-                103.0,
-                98.0,
-                75.0,
-                86.0,
-                57.0,
-                33.0,
+                31.0,
+                39.0,
+                48.0,
+                88.0,
+                87.0,
+                80.0,
+                102.0,
+                92.0,
+                108.0,
+                100.0,
+                97.0,
+                100.0,
+                71.0,
+                76.0,
                 35.0,
-                22.0,
-                19.0,
-                8.0,
-                5.0,
-                3.0,
-                1.0,
-                0.0,
+                32.0,
+                26.0,
+                31.0,
+                12.0,
+                9.0,
+                4.0,
+                4.0,
+                2.0,
                 0.0,
                 0.0,
                 1.0,
                 0.0,
                 0.0,
+                0.0,
             ],
             [
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
-                4.0,
+                2.0,
+                6.0,
+                5.0,
+                11.0,
                 9.0,
-                7.0,
-                12.0,
-                14.0,
-                36.0,
-                31.0,
+                18.0,
+                23.0,
+                32.0,
                 54.0,
-                60.0,
-                88.0,
-                94.0,
+                69.0,
+                81.0,
+                106.0,
+                105.0,
+                126.0,
+                132.0,
+                140.0,
+                148.0,
+                137.0,
+                130.0,
+                121.0,
                 104.0,
-                134.0,
-                150.0,
-                142.0,
-                179.0,
-                120.0,
-                135.0,
-                119.0,
-                108.0,
-                91.0,
-                56.0,
-                38.0,
-                43.0,
-                20.0,
-                15.0,
-                12.0,
-                5.0,
-                1.0,
-                1.0,
-                1.0,
-                1.0,
+                88.0,
+                68.0,
+                53.0,
+                35.0,
+                30.0,
+                16.0,
+                9.0,
+                6.0,
+                3.0,
+                8.0,
+                2.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
             ],
             [
-                0.0,
-                0.0,
                 0.0,
                 0.0,
                 1.0,
-                2.0,
+                0.0,
                 1.0,
                 4.0,
-                11.0,
+                1.0,
                 5.0,
-                21.0,
-                47.0,
-                39.0,
-                69.0,
+                7.0,
+                22.0,
+                20.0,
+                44.0,
+                57.0,
+                60.0,
                 100.0,
-                106.0,
-                145.0,
-                169.0,
-                164.0,
-                199.0,
-                190.0,
-                210.0,
-                197.0,
-                209.0,
-                141.0,
-                162.0,
-                123.0,
-                87.0,
-                64.0,
-                39.0,
-                34.0,
-                16.0,
-                15.0,
-                9.0,
+                149.0,
+                148.0,
+                155.0,
+                201.0,
+                198.0,
+                198.0,
+                216.0,
+                207.0,
+                182.0,
+                159.0,
+                153.0,
+                102.0,
+                104.0,
+                66.0,
+                44.0,
+                28.0,
+                21.0,
+                8.0,
+                11.0,
                 4.0,
-                3.0,
                 4.0,
                 1.0,
+                1.0,
                 0.0,
-                0.0,
+                1.0,
                 0.0,
                 1.0,
             ],
             [
-                1.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
                 2.0,
-                1.0,
-                4.0,
+                2.0,
+                3.0,
+                6.0,
                 8.0,
-                12.0,
                 16.0,
-                26.0,
-                40.0,
-                48.0,
-                81.0,
-                149.0,
+                34.0,
+                53.0,
+                58.0,
+                88.0,
+                106.0,
                 131.0,
-                171.0,
-                222.0,
-                231.0,
-                241.0,
-                260.0,
-                270.0,
-                260.0,
-                200.0,
-                203.0,
-                155.0,
-                150.0,
-                111.0,
-                67.0,
-                61.0,
+                179.0,
+                215.0,
+                206.0,
+                274.0,
+                236.0,
+                261.0,
+                243.0,
+                240.0,
+                207.0,
+                162.0,
+                138.0,
+                115.0,
+                85.0,
+                65.0,
+                59.0,
                 27.0,
-                26.0,
-                28.0,
-                12.0,
-                4.0,
+                22.0,
+                13.0,
+                7.0,
                 5.0,
                 0.0,
-                1.0,
-                1.0,
                 0.0,
                 0.0,
-                2.0,
-            ],
-            [
                 0.0,
                 0.0,
                 0.0,
+            ],
+            [
                 1.0,
+                2.0,
                 0.0,
-                3.0,
+                2.0,
+                1.0,
                 5.0,
-                7.0,
+                6.0,
+                9.0,
                 13.0,
-                23.0,
-                46.0,
-                49.0,
-                88.0,
-                106.0,
-                148.0,
-                179.0,
+                20.0,
+                39.0,
+                60.0,
+                74.0,
+                94.0,
+                145.0,
+                171.0,
                 211.0,
-                232.0,
-                298.0,
-                284.0,
-                287.0,
-                275.0,
+                253.0,
                 281.0,
-                284.0,
-                233.0,
-                211.0,
-                172.0,
-                142.0,
-                84.0,
-                86.0,
-                46.0,
-                26.0,
-                24.0,
-                13.0,
-                10.0,
-                3.0,
+                321.0,
+                311.0,
+                354.0,
+                317.0,
+                289.0,
+                269.0,
+                221.0,
+                199.0,
+                139.0,
+                97.0,
+                73.0,
+                50.0,
+                31.0,
+                29.0,
+                9.0,
+                11.0,
+                4.0,
                 3.0,
-                1.0,
-                0.0,
+                2.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
             ],
             [
                 0.0,
-                1.0,
+                0.0,
+                0.0,
                 1.0,
                 0.0,
                 2.0,
-                4.0,
-                2.0,
-                8.0,
-                16.0,
-                28.0,
+                3.0,
+                17.0,
+                17.0,
+                29.0,
                 42.0,
-                61.0,
-                87.0,
-                105.0,
-                155.0,
-                215.0,
-                253.0,
+                73.0,
+                93.0,
+                104.0,
+                169.0,
+                222.0,
+                232.0,
                 250.0,
-                353.0,
-                334.0,
+                361.0,
+                346.0,
+                375.0,
                 363.0,
-                370.0,
-                344.0,
-                341.0,
-                303.0,
-                268.0,
-                197.0,
-                169.0,
-                119.0,
-                99.0,
-                80.0,
-                49.0,
-                25.0,
-                22.0,
-                11.0,
-                1.0,
+                349.0,
+                333.0,
+                312.0,
+                247.0,
+                195.0,
+                176.0,
+                109.0,
+                92.0,
+                51.0,
+                43.0,
+                26.0,
+                17.0,
+                7.0,
+                6.0,
+                2.0,
                 2.0,
-                1.0,
                 2.0,
-                1.0,
                 0.0,
+                1.0,
                 0.0,
             ],
             [
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 2.0,
-                3.0,
-                7.0,
-                10.0,
-                25.0,
-                28.0,
-                47.0,
-                61.0,
-                80.0,
-                126.0,
-                201.0,
-                206.0,
-                281.0,
-                361.0,
-                341.0,
-                403.0,
-                403.0,
-                416.0,
-                398.0,
-                360.0,
-                345.0,
-                278.0,
-                247.0,
-                206.0,
-                131.0,
-                83.0,
-                69.0,
-                54.0,
-                30.0,
-                22.0,
-                13.0,
-                5.0,
-                3.0,
-                2.0,
-                3.0,
-                0.0,
-                0.0,
-                0.0,
-            ],
-            [
-                0.0,
                 1.0,
-                0.0,
-                1.0,
-                0.0,
-                4.0,
-                7.0,
-                17.0,
+                2.0,
+                6.0,
+                8.0,
                 16.0,
-                25.0,
-                52.0,
-                70.0,
-                102.0,
-                132.0,
-                198.0,
-                274.0,
-                321.0,
-                346.0,
-                420.0,
-                479.0,
-                448.0,
-                445.0,
-                411.0,
-                391.0,
-                348.0,
-                339.0,
-                237.0,
-                202.0,
-                153.0,
-                131.0,
-                71.0,
+                33.0,
                 51.0,
-                39.0,
-                19.0,
-                16.0,
+                95.0,
+                93.0,
+                134.0,
+                164.0,
+                231.0,
+                298.0,
+                353.0,
+                341.0,
+                420.0,
+                432.0,
+                425.0,
+                404.0,
+                360.0,
+                326.0,
+                301.0,
+                211.0,
+                175.0,
+                139.0,
+                93.0,
+                62.0,
+                56.0,
+                26.0,
+                11.0,
+                11.0,
                 11.0,
-                4.0,
-                4.0,
                 1.0,
                 0.0,
+                2.0,
+                1.0,
                 0.0,
                 0.0,
             ],
             [
                 0.0,
                 0.0,
-                1.0,
                 0.0,
+                2.0,
+                1.0,
                 1.0,
-                4.0,
                 9.0,
-                10.0,
-                18.0,
-                37.0,
-                44.0,
-                87.0,
-                92.0,
-                140.0,
-                198.0,
-                236.0,
-                311.0,
-                375.0,
-                432.0,
+                13.0,
+                28.0,
+                21.0,
+                47.0,
+                82.0,
+                106.0,
+                150.0,
+                199.0,
+                241.0,
+                284.0,
+                334.0,
+                403.0,
+                479.0,
                 445.0,
-                478.0,
-                497.0,
-                476.0,
-                412.0,
-                360.0,
-                331.0,
-                255.0,
-                211.0,
-                165.0,
-                131.0,
-                76.0,
-                45.0,
-                34.0,
-                23.0,
+                438.0,
+                408.0,
+                386.0,
+                316.0,
+                300.0,
+                218.0,
+                231.0,
+                135.0,
+                111.0,
+                77.0,
+                68.0,
+                27.0,
+                27.0,
                 12.0,
-                2.0,
-                4.0,
-                2.0,
+                3.0,
+                6.0,
                 0.0,
-                2.0,
+                1.0,
                 0.0,
                 0.0,
+                1.0,
             ],
             [
+                0.0,
+                0.0,
                 0.0,
                 0.0,
                 1.0,
-                2.0,
-                1.0,
-                3.0,
-                13.0,
+                5.0,
+                6.0,
                 13.0,
-                21.0,
-                41.0,
-                51.0,
+                16.0,
+                35.0,
+                68.0,
+                68.0,
                 95.0,
-                108.0,
-                148.0,
-                216.0,
-                261.0,
-                354.0,
+                142.0,
+                190.0,
+                260.0,
+                287.0,
                 363.0,
-                425.0,
-                438.0,
+                403.0,
+                448.0,
+                478.0,
                 446.0,
-                449.0,
-                436.0,
-                424.0,
-                367.0,
-                339.0,
-                279.0,
-                209.0,
-                151.0,
-                107.0,
-                79.0,
-                46.0,
-                28.0,
-                21.0,
-                9.0,
-                5.0,
+                439.0,
+                401.0,
+                396.0,
+                314.0,
+                245.0,
+                226.0,
+                134.0,
+                114.0,
+                66.0,
+                44.0,
+                29.0,
+                23.0,
+                14.0,
                 8.0,
-                1.0,
-                2.0,
+                12.0,
+                6.0,
                 3.0,
                 0.0,
+                2.0,
                 0.0,
             ],
             [
                 0.0,
                 0.0,
                 0.0,
-                4.0,
+                1.0,
                 2.0,
                 3.0,
-                10.0,
-                17.0,
+                9.0,
+                14.0,
                 22.0,
-                41.0,
-                53.0,
-                90.0,
-                100.0,
-                137.0,
-                207.0,
-                243.0,
-                317.0,
-                349.0,
-                404.0,
-                408.0,
-                439.0,
+                34.0,
+                60.0,
+                86.0,
+                129.0,
+                179.0,
+                210.0,
+                270.0,
+                275.0,
+                370.0,
+                416.0,
+                445.0,
+                497.0,
+                449.0,
                 440.0,
-                488.0,
-                443.0,
-                350.0,
-                305.0,
-                271.0,
-                181.0,
-                151.0,
-                101.0,
-                66.0,
-                55.0,
-                27.0,
-                20.0,
-                18.0,
-                3.0,
+                426.0,
+                385.0,
+                278.0,
+                273.0,
+                210.0,
+                141.0,
+                115.0,
+                77.0,
+                50.0,
+                32.0,
+                25.0,
+                15.0,
+                8.0,
+                5.0,
                 3.0,
-                2.0,
                 3.0,
                 0.0,
                 0.0,
                 0.0,
             ],
             [
+                1.0,
                 0.0,
                 0.0,
                 0.0,
                 1.0,
-                2.0,
-                6.0,
                 4.0,
-                17.0,
-                20.0,
-                27.0,
+                5.0,
+                11.0,
+                24.0,
+                19.0,
                 41.0,
-                74.0,
-                97.0,
-                130.0,
-                182.0,
-                240.0,
-                289.0,
-                333.0,
-                360.0,
-                386.0,
-                401.0,
-                426.0,
+                88.0,
+                126.0,
+                120.0,
+                197.0,
+                260.0,
+                281.0,
+                344.0,
+                398.0,
+                411.0,
+                476.0,
+                436.0,
+                488.0,
                 393.0,
-                370.0,
+                331.0,
                 302.0,
-                239.0,
-                218.0,
-                174.0,
-                129.0,
-                112.0,
-                82.0,
-                39.0,
-                27.0,
-                20.0,
+                236.0,
+                205.0,
+                171.0,
+                115.0,
+                61.0,
+                65.0,
+                23.0,
                 19.0,
-                8.0,
-                6.0,
+                11.0,
                 4.0,
+                5.0,
+                2.0,
                 0.0,
-                0.0,
+                3.0,
                 0.0,
                 0.0,
             ],
@@ -1292,171 +1248,215 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                2.0,
+                2.0,
+                4.0,
+                2.0,
+                13.0,
+                22.0,
+                32.0,
+                47.0,
+                72.0,
+                103.0,
+                135.0,
+                209.0,
+                200.0,
+                284.0,
+                341.0,
+                360.0,
+                391.0,
+                412.0,
+                424.0,
+                443.0,
+                370.0,
+                323.0,
+                262.0,
+                221.0,
+                180.0,
+                159.0,
+                91.0,
+                75.0,
+                38.0,
+                28.0,
+                24.0,
+                10.0,
+                6.0,
+                1.0,
+                2.0,
+                0.0,
+                1.0,
                 0.0,
                 0.0,
+            ],
+            [
                 1.0,
+                0.0,
+                0.0,
+                0.0,
                 3.0,
-                9.0,
-                19.0,
-                24.0,
-                56.0,
-                62.0,
-                100.0,
-                121.0,
-                159.0,
-                207.0,
-                269.0,
-                312.0,
-                326.0,
-                316.0,
-                396.0,
-                385.0,
-                331.0,
-                323.0,
-                280.0,
-                241.0,
-                189.0,
-                158.0,
-                126.0,
-                86.0,
-                67.0,
-                33.0,
-                22.0,
-                10.0,
+                1.0,
+                4.0,
                 6.0,
+                18.0,
+                30.0,
+                37.0,
+                66.0,
+                98.0,
+                119.0,
+                141.0,
+                203.0,
+                233.0,
+                303.0,
+                345.0,
+                348.0,
+                360.0,
+                367.0,
+                350.0,
+                302.0,
+                280.0,
+                251.0,
+                203.0,
+                155.0,
+                121.0,
+                64.0,
+                49.0,
+                43.0,
+                28.0,
+                21.0,
+                8.0,
                 4.0,
                 2.0,
                 1.0,
                 1.0,
-                0.0,
                 1.0,
                 0.0,
+                0.0,
             ],
             [
                 0.0,
                 1.0,
                 0.0,
-                2.0,
-                1.0,
                 0.0,
-                3.0,
-                12.0,
-                9.0,
-                21.0,
-                30.0,
-                66.0,
-                71.0,
-                104.0,
-                153.0,
+                0.0,
+                4.0,
+                4.0,
+                10.0,
+                17.0,
+                28.0,
+                43.0,
+                52.0,
+                75.0,
+                108.0,
                 162.0,
-                221.0,
-                247.0,
-                301.0,
-                300.0,
-                314.0,
+                155.0,
+                211.0,
+                268.0,
                 278.0,
-                302.0,
-                262.0,
-                251.0,
+                339.0,
+                331.0,
+                339.0,
+                305.0,
+                239.0,
+                241.0,
                 223.0,
-                194.0,
-                157.0,
-                125.0,
-                76.0,
-                58.0,
-                40.0,
-                18.0,
-                20.0,
-                8.0,
-                3.0,
+                161.0,
+                136.0,
+                93.0,
+                86.0,
+                63.0,
+                32.0,
+                25.0,
+                15.0,
+                10.0,
+                0.0,
                 2.0,
                 1.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
             ],
             [
+                2.0,
                 0.0,
                 0.0,
                 0.0,
                 1.0,
-                5.0,
                 1.0,
-                4.0,
                 1.0,
-                9.0,
-                19.0,
-                24.0,
-                50.0,
-                76.0,
-                88.0,
-                102.0,
-                138.0,
-                199.0,
-                195.0,
-                211.0,
+                5.0,
+                10.0,
+                17.0,
+                27.0,
+                40.0,
+                86.0,
+                91.0,
+                123.0,
+                150.0,
+                172.0,
+                197.0,
+                247.0,
+                237.0,
+                255.0,
+                279.0,
+                271.0,
                 218.0,
-                245.0,
-                273.0,
-                236.0,
-                221.0,
-                203.0,
-                161.0,
+                189.0,
+                194.0,
                 152.0,
-                105.0,
+                108.0,
                 92.0,
-                69.0,
-                49.0,
-                24.0,
-                10.0,
-                11.0,
+                52.0,
+                41.0,
+                32.0,
+                16.0,
+                22.0,
                 5.0,
-                6.0,
-                4.0,
-                1.0,
                 1.0,
+                4.0,
                 1.0,
                 0.0,
                 0.0,
+                0.0,
+                0.0,
             ],
             [
-                0.0,
+                1.0,
                 1.0,
                 0.0,
+                0.0,
                 1.0,
                 2.0,
-                1.0,
                 6.0,
+                4.0,
                 6.0,
-                16.0,
-                16.0,
-                19.0,
-                42.0,
-                35.0,
-                68.0,
-                104.0,
-                115.0,
-                139.0,
-                176.0,
-                175.0,
-                231.0,
-                226.0,
-                210.0,
-                205.0,
-                180.0,
-                155.0,
-                136.0,
-                108.0,
-                89.0,
-                70.0,
-                57.0,
-                32.0,
+                14.0,
                 22.0,
-                11.0,
-                8.0,
-                5.0,
-                4.0,
+                28.0,
+                57.0,
+                56.0,
+                87.0,
+                111.0,
+                142.0,
+                169.0,
+                206.0,
+                202.0,
+                211.0,
+                209.0,
+                181.0,
+                174.0,
+                158.0,
+                157.0,
+                105.0,
+                89.0,
+                62.0,
+                44.0,
+                34.0,
+                20.0,
+                15.0,
+                12.0,
+                9.0,
+                7.0,
                 1.0,
                 1.0,
                 1.0,
@@ -1465,92 +1465,92 @@ def test_numpy_2d():
                 0.0,
             ],
             [
-                0.0,
-                0.0,
                 0.0,
                 0.0,
                 0.0,
                 1.0,
-                3.0,
-                7.0,
-                7.0,
-                15.0,
-                20.0,
-                24.0,
-                32.0,
-                53.0,
-                66.0,
-                85.0,
-                97.0,
-                109.0,
-                139.0,
-                135.0,
-                134.0,
-                141.0,
-                171.0,
-                159.0,
-                121.0,
-                93.0,
-                92.0,
-                62.0,
-                46.0,
-                39.0,
-                21.0,
-                20.0,
-                6.0,
-                5.0,
                 1.0,
                 1.0,
                 1.0,
+                5.0,
+                4.0,
+                8.0,
+                15.0,
+                27.0,
+                33.0,
+                38.0,
+                64.0,
+                67.0,
+                84.0,
+                119.0,
+                131.0,
+                153.0,
+                165.0,
+                151.0,
+                151.0,
+                129.0,
+                126.0,
+                125.0,
+                92.0,
+                70.0,
+                46.0,
+                33.0,
+                23.0,
+                22.0,
+                10.0,
+                7.0,
                 2.0,
                 1.0,
+                1.0,
+                0.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
             ],
             [
                 0.0,
-                1.0,
                 0.0,
-                1.0,
-                1.0,
+                0.0,
                 0.0,
                 1.0,
                 2.0,
-                3.0,
+                2.0,
+                7.0,
+                8.0,
                 11.0,
-                21.0,
-                14.0,
-                26.0,
+                16.0,
+                15.0,
                 35.0,
-                44.0,
-                65.0,
-                73.0,
-                92.0,
-                93.0,
-                111.0,
-                114.0,
-                115.0,
-                115.0,
-                91.0,
-                64.0,
+                43.0,
+                39.0,
+                61.0,
                 86.0,
-                52.0,
-                44.0,
-                33.0,
+                99.0,
+                83.0,
+                131.0,
+                131.0,
+                107.0,
+                101.0,
+                112.0,
+                86.0,
+                76.0,
+                69.0,
+                57.0,
+                39.0,
                 32.0,
-                22.0,
-                15.0,
-                4.0,
-                5.0,
-                4.0,
-                2.0,
-                2.0,
-                0.0,
+                17.0,
+                11.0,
+                8.0,
+                1.0,
+                3.0,
+                3.0,
                 0.0,
+                1.0,
                 0.0,
                 1.0,
                 0.0,
+                0.0,
             ],
             [
                 0.0,
@@ -1559,37 +1559,37 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 1.0,
-                1.0,
-                1.0,
-                4.0,
+                0.0,
+                2.0,
+                6.0,
                 4.0,
-                12.0,
-                16.0,
-                31.0,
-                30.0,
-                28.0,
-                59.0,
-                50.0,
-                51.0,
-                62.0,
-                77.0,
+                11.0,
+                17.0,
+                22.0,
+                20.0,
+                34.0,
+                27.0,
+                46.0,
+                80.0,
+                69.0,
+                71.0,
+                76.0,
+                79.0,
                 66.0,
-                77.0,
-                61.0,
-                75.0,
+                82.0,
+                67.0,
+                58.0,
                 49.0,
-                63.0,
-                41.0,
-                34.0,
-                23.0,
-                17.0,
+                32.0,
+                21.0,
+                22.0,
                 21.0,
-                8.0,
                 9.0,
+                5.0,
                 4.0,
-                0.0,
-                0.0,
-                0.0,
+                5.0,
+                2.0,
+                3.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1603,42 +1603,42 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
                 1.0,
-                6.0,
+                1.0,
+                1.0,
+                2.0,
                 4.0,
                 8.0,
-                7.0,
-                12.0,
+                19.0,
+                15.0,
                 16.0,
-                21.0,
-                27.0,
-                31.0,
-                43.0,
-                56.0,
-                68.0,
-                44.0,
-                50.0,
-                65.0,
-                38.0,
-                43.0,
-                32.0,
-                32.0,
-                20.0,
+                26.0,
+                26.0,
+                49.0,
+                54.0,
+                51.0,
+                45.0,
+                46.0,
+                55.0,
+                39.0,
+                33.0,
+                40.0,
+                24.0,
                 22.0,
+                20.0,
+                15.0,
+                8.0,
                 11.0,
-                9.0,
-                11.0,
-                1.0,
-                0.0,
+                4.0,
                 2.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
+                0.0,
                 0.0,
                 0.0,
-                1.0,
             ],
             [
                 0.0,
@@ -1647,42 +1647,42 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                3.0,
-                2.0,
-                2.0,
+                1.0,
+                0.0,
+                1.0,
                 2.0,
                 1.0,
-                7.0,
-                9.0,
-                9.0,
+                6.0,
                 8.0,
-                22.0,
-                29.0,
-                26.0,
-                26.0,
-                27.0,
-                29.0,
-                32.0,
-                23.0,
-                28.0,
+                12.0,
+                15.0,
                 28.0,
+                24.0,
                 25.0,
-                16.0,
-                15.0,
+                30.0,
+                39.0,
+                34.0,
+                28.0,
+                27.0,
+                27.0,
+                22.0,
+                18.0,
                 10.0,
-                8.0,
-                5.0,
+                11.0,
+                6.0,
                 4.0,
+                9.0,
+                1.0,
                 2.0,
                 2.0,
                 1.0,
-                0.0,
                 1.0,
                 1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
+                0.0,
             ],
             [
                 0.0,
@@ -1691,39 +1691,39 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 1.0,
-                0.0,
-                0.0,
+                1.0,
                 0.0,
                 1.0,
                 2.0,
-                2.0,
+                0.0,
                 4.0,
-                6.0,
-                11.0,
-                13.0,
+                5.0,
+                5.0,
                 9.0,
-                17.0,
-                11.0,
-                27.0,
-                23.0,
-                25.0,
+                12.0,
+                13.0,
+                22.0,
+                22.0,
                 19.0,
-                24.0,
+                23.0,
                 21.0,
-                15.0,
-                22.0,
-                12.0,
-                7.0,
-                1.0,
+                20.0,
+                20.0,
+                10.0,
+                20.0,
+                11.0,
+                8.0,
+                5.0,
+                5.0,
                 4.0,
+                0.0,
                 2.0,
                 2.0,
                 2.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1734,35 +1734,35 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
-                0.0,
-                0.0,
+                2.0,
+                1.0,
                 1.0,
                 0.0,
+                1.0,
                 3.0,
-                0.0,
-                4.0,
+                2.0,
                 3.0,
+                1.0,
                 4.0,
-                7.0,
-                11.0,
-                7.0,
+                4.0,
+                10.0,
                 11.0,
+                13.0,
+                16.0,
                 12.0,
-                14.0,
-                15.0,
-                11.0,
-                10.0,
+                9.0,
+                18.0,
+                19.0,
+                6.0,
                 8.0,
-                10.0,
                 5.0,
-                9.0,
-                2.0,
-                3.0,
                 5.0,
-                0.0,
                 1.0,
+                4.0,
+                0.0,
                 2.0,
+                1.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1779,33 +1779,33 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                2.0,
-                8.0,
-                4.0,
+                1.0,
+                1.0,
+                1.0,
+                3.0,
+                5.0,
+                3.0,
+                1.0,
                 5.0,
-                4.0,
-                6.0,
                 11.0,
+                2.0,
+                5.0,
                 3.0,
                 8.0,
-                8.0,
                 4.0,
+                3.0,
                 6.0,
                 4.0,
-                0.0,
                 1.0,
-                7.0,
-                1.0,
-                3.0,
                 2.0,
                 0.0,
-                1.0,
+                0.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1827,27 +1827,27 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
-                0.0,
-                2.0,
                 1.0,
+                4.0,
                 0.0,
                 3.0,
                 2.0,
-                1.0,
+                3.0,
+                4.0,
+                4.0,
+                8.0,
+                3.0,
                 6.0,
-                12.0,
-                5.0,
-                5.0,
-                1.0,
                 2.0,
                 2.0,
                 4.0,
                 1.0,
                 1.0,
+                2.0,
                 0.0,
-                3.0,
                 0.0,
                 1.0,
                 0.0,
@@ -1874,26 +1874,26 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
                 1.0,
-                0.0,
-                2.0,
-                2.0,
-                0.0,
-                0.0,
-                6.0,
-                3.0,
+                1.0,
+                1.0,
+                1.0,
+                1.0,
                 2.0,
+                4.0,
                 2.0,
                 1.0,
+                2.0,
+                4.0,
                 1.0,
                 1.0,
                 1.0,
-                0.0,
                 1.0,
+                2.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1917,28 +1917,28 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
-                2.0,
-                2.0,
                 1.0,
-                3.0,
-                3.0,
-                0.0,
                 0.0,
+                2.0,
+                3.0,
                 1.0,
                 0.0,
+                2.0,
+                3.0,
                 0.0,
                 1.0,
+                1.0,
+                1.0,
+                1.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
-                0.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1961,19 +1961,16 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                0.0,
-                0.0,
                 1.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
+                2.0,
                 3.0,
-                1.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
@@ -1991,6 +1988,9 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                0.0,
+                0.0,
+                0.0,
             ],
             [
                 0.0,
@@ -2003,17 +2003,13 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
-                1.0,
                 0.0,
                 0.0,
-                2.0,
                 0.0,
                 0.0,
                 0.0,
@@ -2021,9 +2017,13 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 0.0,
+                1.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
+                0.0,
                 0.0,
                 0.0,
                 0.0,
@@ -2052,23 +2052,23 @@ def test_numpy_2d():
                 0.0,
                 0.0,
                 1.0,
+                2.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
-                1.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
                 0.0,
+                1.0,
                 0.0,
                 0.0,
                 0.0,