internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: arviz-devs/arviz

Issue:
plot_trace assumes specific dimensions ordering for divergences
**Describe the bug**
If an `InferenceData` contains a `diverging` variable in `sample_stats` that uses the dimension ordering `(draw, chain)` instead of `(chain, draw)`, then `plot_trace` fails.

**To Reproduce**
```python
>>> import arviz as az
>>> import numpy as np
>>> idata = az.from_dict(
...     dict(x=np.random.normal(size=(4, 100, 2))),
...     sample_stats=dict(diverging=np.random.randint(0, 1, size=(4, 100), dtype=bool))
... )
>>> az.plot_trace(idata) # fine
array([[<AxesSubplot:title={'center':'x'}>,
        <AxesSubplot:title={'center':'x'}>]], dtype=object)
>>> idata.posterior['x'] = idata.posterior.x.transpose()
>>> idata.sample_stats['diverging'] = idata.sample_stats.diverging.transpose()
>>> az.plot_trace(idata) # error
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sethaxen/projects/arviz/arviz/plots/traceplot.py", line 263, in plot_trace
    axes = plot(**trace_plot_args)
  File "/home/sethaxen/projects/arviz/arviz/plots/backends/matplotlib/traceplot.py", line 347, in plot_trace
    div_draws = data.draw.values[chain_divs]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 100 but corresponding boolean dimension is 4
>>> idata = az.InferenceData(posterior=idata.posterior)
>>> az.plot_trace(idata) # fine without diverging
array([[<AxesSubplot:title={'center':'x'}>,
        <AxesSubplot:title={'center':'x'}>]], dtype=object)
```

**Expected behavior**
I expected all calls to `plot_trace` to work above.

**Additional context**
These checks were performed on main.



Discussion:

Resolving patch:
diff --git a/arviz/plots/traceplot.py b/arviz/plots/traceplot.py
--- a/arviz/plots/traceplot.py
+++ b/arviz/plots/traceplot.py
@@ -174,7 +174,9 @@ def plot_trace(
         divergences = "top" if rug else "bottom"
     if divergences:
         try:
-            divergence_data = convert_to_dataset(data, group="sample_stats").diverging
+            divergence_data = convert_to_dataset(data, group="sample_stats").diverging.transpose(
+                "chain", "draw"
+            )
         except (ValueError, AttributeError):  # No sample_stats, or no `.diverging`
             divergences = None
 


Test patch:
diff --git a/arviz/tests/base_tests/test_plots_matplotlib.py b/arviz/tests/base_tests/test_plots_matplotlib.py
--- a/arviz/tests/base_tests/test_plots_matplotlib.py
+++ b/arviz/tests/base_tests/test_plots_matplotlib.py
@@ -294,6 +294,12 @@ def test_plot_trace_invalid_varname_warning(models, kwargs):
     assert axes.shape
 
 
+def test_plot_trace_diverging_correctly_transposed():
+    idata = load_arviz_data("centered_eight")
+    idata.sample_stats["diverging"] = idata.sample_stats.diverging.T
+    plot_trace(idata, divergences="bottom")
+
+
 @pytest.mark.parametrize(
     "bad_kwargs", [{"var_names": ["mu", "tau"], "lines": [("mu", {}, ["hey"])]}]
 )
Repository: arviz-devs/arviz

Issue:
Plot trace for rank bars need the bottoms to be aligned for hierarchical model
**Describe the bug**
For the hierarchical model,  when `compact = True`
- plot trace for rank bars needs the bottoms to be aligned
- `rank_kwargs={"bar_kwargs": {"alpha": 0.2}} is needed


![image](https://user-images.githubusercontent.com/30194633/205079942-80e2d948-a8bf-4a2d-b25b-4859d98bfb12.png)

when `compact=False`the following is showed
![image](https://user-images.githubusercontent.com/30194633/205079381-a6ce025b-654b-4104-931b-4f8b8beee042.png)

**To Reproduce**
```
import arviz as az
idata = az.load_arviz_data("centered_eight")
az.plot_trace(idata, var_names = "theta", coords = {"school": ["Choate", "Deerfield"],}, kind = "rank_bars", figsize= (20, 15), rank_kwargs={"bar_kwargs": {"alpha": 0.2}})
```



Discussion:

Resolving patch:
diff --git a/arviz/plots/backends/matplotlib/rankplot.py b/arviz/plots/backends/matplotlib/rankplot.py
--- a/arviz/plots/backends/matplotlib/rankplot.py
+++ b/arviz/plots/backends/matplotlib/rankplot.py
@@ -71,7 +71,7 @@ def plot_rank(
         all_counts = np.empty((len(ranks), len(bin_ary) - 1))
         for idx, row in enumerate(ranks):
             _, all_counts[idx], _ = histogram(row, bins=bin_ary)
-        gap = all_counts.max() * 1.05
+        gap = 2 / ranks.size
         width = bin_ary[1] - bin_ary[0]
 
         bar_kwargs.setdefault("width", width)
diff --git a/arviz/plots/backends/matplotlib/traceplot.py b/arviz/plots/backends/matplotlib/traceplot.py
--- a/arviz/plots/backends/matplotlib/traceplot.py
+++ b/arviz/plots/backends/matplotlib/traceplot.py
@@ -192,6 +192,9 @@ def plot_trace(
     fill_kwargs = matplotlib_kwarg_dealiaser(fill_kwargs, "fill_between")
     rug_kwargs = matplotlib_kwarg_dealiaser(rug_kwargs, "scatter")
     rank_kwargs = matplotlib_kwarg_dealiaser(rank_kwargs, "bar")
+    if compact:
+        rank_kwargs.setdefault("bar_kwargs", {})
+        rank_kwargs["bar_kwargs"].setdefault("alpha", 0.2)
 
     textsize = plot_kwargs.pop("textsize", 10)
 


Test patch:
Repository: arviz-devs/arviz

Issue:
Clean up references to deprecated NumPy type aliases
Deprecated NumPy type aliases (np.bool, np.int, np.float, np.complex, np.object, np.str) need to be replaced with their recommended replacement (bool, int, float, complex, object, str). Warnings were added in numpy 1.20, and the numpy team is removing the aliases in 1.24.
https://github.com/numpy/numpy/pull/22607

Here are the remaining references:

*  https://github.com/arviz-devs/arviz/blob/7main/arviz/data/io_pyro.py#L132
*  https://github.com/arviz-devs/arviz/blob/main/arviz/stats/density_utils.py#L306
* https://github.com/arviz-devs/arviz/blob/main/arviz/stats/diagnostics.py#L831
* https://github.com/arviz-devs/arviz/blob/main/arviz/stats/diagnostics.py#L908

Thanks!


Discussion:

Resolving patch:
diff --git a/arviz/data/io_pyro.py b/arviz/data/io_pyro.py
--- a/arviz/data/io_pyro.py
+++ b/arviz/data/io_pyro.py
@@ -129,7 +129,7 @@ def posterior_to_xarray(self):
     def sample_stats_to_xarray(self):
         """Extract sample_stats from Pyro posterior."""
         divergences = self.posterior.diagnostics()["divergences"]
-        diverging = np.zeros((self.nchains, self.ndraws), dtype=np.bool)
+        diverging = np.zeros((self.nchains, self.ndraws), dtype=bool)
         for i, k in enumerate(sorted(divergences)):
             diverging[i, divergences[k]] = True
         data = {"diverging": diverging}
diff --git a/arviz/stats/density_utils.py b/arviz/stats/density_utils.py
--- a/arviz/stats/density_utils.py
+++ b/arviz/stats/density_utils.py
@@ -303,7 +303,7 @@ def _check_custom_lims(custom_lims, x_min, x_max):
     if custom_lims[1] is None:
         custom_lims[1] = x_max
 
-    all_numeric = all(isinstance(i, (int, float, np.integer, np.float)) for i in custom_lims)
+    all_numeric = all(isinstance(i, (int, float, np.integer, np.number)) for i in custom_lims)
     if not all_numeric:
         raise TypeError(
             "Elements of `custom_lims` must be numeric or None.\nAt least one of them is not."
diff --git a/arviz/stats/diagnostics.py b/arviz/stats/diagnostics.py
--- a/arviz/stats/diagnostics.py
+++ b/arviz/stats/diagnostics.py
@@ -836,7 +836,7 @@ def _mcse_sd(ary):
         return np.nan
     ess = _ess_sd(ary)
     if _numba_flag:
-        sd = np.float(_sqrt(svar(np.ravel(ary), ddof=1), np.zeros(1)))
+        sd = float(_sqrt(svar(np.ravel(ary), ddof=1), np.zeros(1)))
     else:
         sd = np.std(ary, ddof=1)
     fac_mcse_sd = np.sqrt(np.exp(1) * (1 - 1 / ess) ** (ess - 1) - 1)
@@ -905,7 +905,7 @@ def _mc_error(ary, batches=5, circular=False):
                 else:
                     std = stats.circstd(ary, high=np.pi, low=-np.pi)
             elif _numba_flag:
-                std = np.float(_sqrt(svar(ary), np.zeros(1)))
+                std = float(_sqrt(svar(ary), np.zeros(1)))
             else:
                 std = np.std(ary)
             return std / np.sqrt(len(ary))


Test patch:
Repository: arviz-devs/arviz

Issue:
np.product is deprecated in numpy v1.25
**Describe the bug**
np.product is deprecated in v1.25.
https://github.com/numpy/numpy/releases/tag/v1.25.0rc1

There are a few instances currently in arviz. See [here](https://github.com/search?q=repo%3Aarviz-devs%2Farviz%20np.product&type=code)

**To Reproduce**
N/A

**Expected behavior**
np.product can be replaced by np.prod




Discussion:
Hey @michaelquinn32, I would love to work on this repository issues, starting with this one. Can you please assign this to me? 
@Surya-Narayan it would be great if you can submit a PR for this!

We have guidance on contributing at https://python.arviz.org/en/stable/contributing/index.html, but don't hesitate to ask any doubt you may have over here.

Resolving patch:
diff --git a/arviz/data/io_pystan.py b/arviz/data/io_pystan.py
--- a/arviz/data/io_pystan.py
+++ b/arviz/data/io_pystan.py
@@ -669,8 +669,8 @@ def get_draws(fit, variables=None, ignore=None, warmup=False, dtypes=None):
         par_idx = min(
             (dim, i) for i, dim in enumerate(fit.sim["dims_oi"]) if (dim and np.prod(dim) != 0)
         )[1]
-        offset = int(sum(map(np.product, fit.sim["dims_oi"][:par_idx])))
-        par_offset = int(np.product(fit.sim["dims_oi"][par_idx]))
+        offset = int(sum(map(np.prod, fit.sim["dims_oi"][:par_idx])))
+        par_offset = int(np.prod(fit.sim["dims_oi"][par_idx]))
         par_keys = fit.sim["fnames_oi"][offset : offset + par_offset]
         shift = len(par_keys)
         for item in par_keys:
diff --git a/arviz/stats/density_utils.py b/arviz/stats/density_utils.py
--- a/arviz/stats/density_utils.py
+++ b/arviz/stats/density_utils.py
@@ -240,7 +240,7 @@ def _fixed_point(t, N, k_sq, a_sq):
 
     for j in np.arange(l - 1, 2 - 1, -1):
         c1 = (1 + 0.5 ** (j + 0.5)) / 3
-        c2 = np.product(np.arange(1.0, 2 * j + 1, 2, dtype=np.float64))
+        c2 = np.prod(np.arange(1.0, 2 * j + 1, 2, dtype=np.float64))
         c2 /= (np.pi / 2) ** 0.5
         t_j = np.power((c1 * (c2 / (N * f))), (2.0 / (3.0 + 2.0 * j)))
         f = np.sum(k_sq**j * a_sq * np.exp(-k_sq * np.pi**2.0 * t_j))
diff --git a/arviz/stats/stats.py b/arviz/stats/stats.py
--- a/arviz/stats/stats.py
+++ b/arviz/stats/stats.py
@@ -769,7 +769,7 @@ def loo(data, pointwise=None, var_name=None, reff=None, scale=None):
     log_likelihood = log_likelihood.stack(__sample__=("chain", "draw"))
     shape = log_likelihood.shape
     n_samples = shape[-1]
-    n_data_points = np.product(shape[:-1])
+    n_data_points = np.prod(shape[:-1])
     scale = rcParams["stats.ic_scale"] if scale is None else scale.lower()
 
     if scale == "deviance":
@@ -1626,7 +1626,7 @@ def waic(data, pointwise=None, var_name=None, scale=None, dask_kwargs=None):
     log_likelihood = log_likelihood.stack(__sample__=("chain", "draw"))
     shape = log_likelihood.shape
     n_samples = shape[-1]
-    n_data_points = np.product(shape[:-1])
+    n_data_points = np.prod(shape[:-1])
 
     ufunc_kwargs = {"n_dims": 1, "ravel": False}
     kwargs = {"input_core_dims": [["__sample__"]]}


Test patch:
Repository: arviz-devs/arviz

Issue:
arviz not compatible with pre-releases
**Describe the bug**

> import arviz as az
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/init.py:34: in
> from .plots import *
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/plots/init.py:2: in
> from .autocorrplot import plot_autocorr
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/plots/autocorrplot.py:7: in
> from .plot_utils import default_grid, filter_plotters_list, get_plotting_function
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/plots/plot_utils.py:15: in
> from ..stats.density_utils import kde
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/stats/init.py:3: in
> from .density_utils import *
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/stats/density_utils.py:8: in
> from scipy.signal import convolve, convolve2d, gaussian # pylint: disable=no-name-in-module
> E ImportError: cannot import name 'gaussian' from 'scipy.signal' (/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/scipy/signal/init.py)

**To Reproduce**
Found it in my CI. Probably one just needs to install `arviz` with the `--pre` flag.



Discussion:

Resolving patch:
diff --git a/arviz/stats/density_utils.py b/arviz/stats/density_utils.py
--- a/arviz/stats/density_utils.py
+++ b/arviz/stats/density_utils.py
@@ -5,7 +5,8 @@
 import numpy as np
 from scipy.fftpack import fft
 from scipy.optimize import brentq
-from scipy.signal import convolve, convolve2d, gaussian  # pylint: disable=no-name-in-module
+from scipy.signal import convolve, convolve2d
+from scipy.signal.windows import gaussian
 from scipy.sparse import coo_matrix
 from scipy.special import ive  # pylint: disable=no-name-in-module
 


Test patch:
Repository: arviz-devs/arviz

Issue:
Add `InferenceData.close` method
## Tell us about it

When an `InferenceData` object is read from a file, `xarray` will try to lazily load the underlying `Dataset` objects keeping an open connection to the underlying file in disk. `xarray.Dataset` provide the [`close` method](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.close.html) to release any resources attached to the open dataset, but `arviz` does not have something like that for `InferenceData` objects. That makes it quite complicated to actually release resources if one might need to overwrite the contents of the file that was originally read from disk.



Discussion:

Resolving patch:
diff --git a/arviz/data/inference_data.py b/arviz/data/inference_data.py
--- a/arviz/data/inference_data.py
+++ b/arviz/data/inference_data.py
@@ -1689,6 +1689,7 @@ def extend(self, other, join="left"):
     compute = _extend_xr_method(xr.Dataset.compute)
     persist = _extend_xr_method(xr.Dataset.persist)
     quantile = _extend_xr_method(xr.Dataset.quantile)
+    close = _extend_xr_method(xr.Dataset.close)
 
     # The following lines use methods on xr.Dataset that are dynamically defined and attached.
     # As a result mypy cannot see them, so we have to suppress the resulting mypy errors.


Test patch:
Repository: activeloopai/deeplake

Issue:
PermissionException on AWS
Facing issues with ds.store() on AWS while the same code works properly locally.
Error : `hub.exceptions.PermissionException: No permision to store the dataset at s3://snark-hub/public/abhinav/ds`

For now, got it working using `sudo rm -rf /tmp/dask-worker-space/`.
A proper fix is needed.





Discussion:
The problem is when you have multiple users on the same machine using hub writing cache to global directory (`/tmp`) then you have permission issues. 

Solution to this problem is to move `/tmp/*` to local directory of the user `~/tmp/` or hidden folder `~/.activeloop/tmp` near credentials.

The line is here
https://github.com/activeloopai/Hub/blob/master/hub/collections/client_manager.py#L75
Hey! I can tackle on this. Is the only needed change the one you outlined, changing it to (I prefer the hidden folder one) `~/.activeloop/tmp`?

Resolving patch:
diff --git a/hub/collections/client_manager.py b/hub/collections/client_manager.py
--- a/hub/collections/client_manager.py
+++ b/hub/collections/client_manager.py
@@ -35,7 +35,7 @@ def init(
     distributed=True,
 ):
     """Initializes cluster either local or on the cloud
-        
+
         Parameters
         ----------
         token: str
@@ -67,12 +67,20 @@ def init(
             if memory_limit is not None
             else psutil.virtual_memory().available
         )
+
+        local_directory = os.path.join(
+            os.path.expanduser('~'),
+            '.activeloop',
+            'tmp',
+        )
+        if not os.path.exists(local_directory):
+            os.makedirs(local_directory)
         client = Client(
             n_workers=n_workers,
             processes=processes,
             memory_limit=memory_limit,
             threads_per_worker=threads_per_worker,
-            local_directory="/tmp/",
+            local_directory=local_directory,
         )
         config.DISTRIBUTED = True
 


Test patch:
Repository: activeloopai/deeplake

Issue:
[BUG] hub.Dataset.from_tensorflow throws error upon execution
## 🐛🐛 Bug Report
The static method `from_tensorflow` throws an error upon execution. It looks like an issue with the Tensorflow 2.4.0 API update.

### ⚗️ Current Behavior
Upon execution, the static method throws the error: "module 'tensorflow' has no attribute 'python'". It happens because `tensorflow.__init__()` explicitly deletes its reference to the `tensorflow.python` module after importing everything from it.

**Input Code**
```
import tensorflow as tf
import hub

ds = tf.data.Dataset.from_tensor_slices({'a': [1, 2], 'b': [5, 6]})
out_ds = hub.Dataset.from_tensorflow(ds)
```

**Expected behavior/code**
The  code should run without any error.

### 🧰 Possible Solution
Replacement of `tf.python.framework.tensor_spec.TensorSpec` with `tf.TensorSpec`




Discussion:

Resolving patch:
diff --git a/hub/api/dataset.py b/hub/api/dataset.py
--- a/hub/api/dataset.py
+++ b/hub/api/dataset.py
@@ -798,14 +798,14 @@ def from_tensorflow(ds, scheduler: str = "single", workers: int = 1):
             global tf
 
         def generate_schema(ds):
-            if isinstance(ds._structure, tf.python.framework.tensor_spec.TensorSpec):
+            if isinstance(ds._structure, tf.TensorSpec):
                 return tf_to_hub({"data": ds._structure}).dict_
             return tf_to_hub(ds._structure).dict_
 
         def tf_to_hub(tf_dt):
             if isinstance(tf_dt, dict):
                 return dict_to_hub(tf_dt)
-            elif isinstance(tf_dt, tf.python.framework.tensor_spec.TensorSpec):
+            elif isinstance(tf_dt, tf.TensorSpec):
                 return TensorSpec_to_hub(tf_dt)
 
         def TensorSpec_to_hub(tf_dt):


Test patch:
Repository: activeloopai/deeplake

Issue:
[BUG]
## 🐛🐛 Bug Report


### ⚗️ Current Behavior
Hub's version info is present in two locations, `setup.py` and `hub/version.py`. As result, the released version displays the wrong version info (1.2.3 instead of 1.3.0) when users do `hub --version`.

### 🧰 Possible Solution  (optional)
Remove version info from `setup.py`.


Discussion:
If you don't mind, I'd like to tackle this issue! @mynameisvinn 
yes please @dhiganthrao! ready whenever you are!

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,6 @@
 from setuptools import find_packages, setup
 
 project = "hub"
-VERSION = "1.3.0"
 
 this_directory = os.path.abspath(os.path.dirname(__file__))
 with open(os.path.join(this_directory, "README.md")) as f:
@@ -20,7 +19,6 @@
 
 setup(
     name=project,
-    version=VERSION,
     description="Activeloop Hub",
     long_description=long_description,
     long_description_content_type="text/markdown",


Test patch:
Repository: activeloopai/deeplake

Issue:
[BUG] hub.read failing with h265 videos
Hi, hub.read() fails to decompress h265 videos right. I get unreadable videos with a higher number of frames (x10). When converting it to h264 first, hub.read() seems to work fine.


Discussion:
Hey @yuvalsCG! Sorry about this issue! We will look into it asap.
Hey @yuvalsCG, we're having trouble recreating this issue. Any chance you could send us the files that caused trouble? We can exchange the data privately of course. 
Hi, what's your mail?
@yuvalsCG Pls ping me at ivo@activeloop.ai
Hey @yuvalsCG. Thank you for sending over the files! We were able to replicate your issues on `main`. 

It appears that [This PR](https://github.com/activeloopai/Hub/pull/1361) also solves the issues. We need to do more testing and cleanup, but I'll keep you posted on the merge.

Thank you for your patience!

Resolving patch:
diff --git a/hub/core/compression.py b/hub/core/compression.py
--- a/hub/core/compression.py
+++ b/hub/core/compression.py
@@ -827,7 +827,7 @@ def _get_video_info(file: Union[bytes, memoryview, str]) -> dict:
         "-select_streams",
         "v:0",
         "-show_entries",
-        "stream=width,height,duration,r_frame_rate",
+        "stream=width,height,duration,avg_frame_rate",
         "-of",
         "default=noprint_wrappers=1",
         "pipe:",


Test patch:
Repository: activeloopai/deeplake

Issue:
[BUG] Pytorch dataloader because of transforms and shuffle=false
## 🐛🐛 Bug Report


### ⚗️ Current Behavior
A clear and concise description of the behavior.

```python
import hub
ds = hub.load("hub://activeloop/mnist-test")

dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={"images": None, "labels": None})
for (images, labels) in dataloader:
  print(images.shape, labels.shape)
  break
```

```
Opening dataset in read-only mode as you don't have write permissions.
hub://activeloop/mnist-test loaded successfully.
This dataset can be visualized at https://app.activeloop.ai/activeloop/mnist-test.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-21-22b652d8dbed>](https://localhost:8080/#) in <module>()
      4 dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={"images": None, "labels": None})
      5 for (images, labels) in dataloader:
----> 6   print(images.shape, labels.shape)
      7   break

AttributeError: 'str' object has no attribute 'shape'
```

but when you remove the argument `transform` from dataloader that script works.

### ⚙️ Environment

- Google colab



Discussion:

Resolving patch:
diff --git a/hub/integrations/pytorch/common.py b/hub/integrations/pytorch/common.py
--- a/hub/integrations/pytorch/common.py
+++ b/hub/integrations/pytorch/common.py
@@ -53,5 +53,6 @@ def __call__(self, data_in: Dict) -> Dict:
             for tensor, fn in self.transform_dict.items():
                 value = data_in[tensor]
                 data_out[tensor] = value if fn is None else fn(value)
+            data_out = IterableOrderedDict(data_out)
             return data_out
         return data_in


Test patch:
diff --git a/hub/integrations/tests/test_pytorch.py b/hub/integrations/tests/test_pytorch.py
--- a/hub/integrations/tests/test_pytorch.py
+++ b/hub/integrations/tests/test_pytorch.py
@@ -201,6 +201,13 @@ def test_pytorch_transform_dict(ds):
                 batch["image2"].numpy(), i * np.ones((1, 12, 12))
             )
 
+    for _ in range(2):
+        for i, (image, image2) in enumerate(dl):
+            np.testing.assert_array_equal(
+                image.numpy(), 2 * i * np.ones((1, i + 1, i + 1))
+            )
+            np.testing.assert_array_equal(image2.numpy(), i * np.ones((1, 12, 12)))
+
 
 @requires_torch
 @enabled_datasets