diff --git a/src/pymor/vectorarrays/list.py b/src/pymor/vectorarrays/list.py
index f2fe49a13..32e2397ed 100644
--- a/src/pymor/vectorarrays/list.py
+++ b/src/pymor/vectorarrays/list.py
@@ -392,6 +392,8 @@ class ListVectorArray(VectorArray):
         return len(self._list)
 
     def __getitem__(self, ind):
+        if isinstance(ind, Number) and (ind >= len(self) or ind < -len(self)):
+            raise IndexError('VectorArray index out of range')
         return ListVectorArrayView(self, ind)
 
     def __delitem__(self, ind):
@@ -724,7 +726,10 @@ class ListVectorArrayView(ListVectorArray):
         return self.base.space
 
     def __getitem__(self, ind):
-        return self.base[self.base.sub_index(self.ind, ind)]
+        try:
+            return self.base[self.base.sub_index(self.ind, ind)]
+        except IndexError:
+            raise IndexError('VectorArray index out of range')
 
     def __delitem__(self, ind):
         raise TypeError('Cannot remove from ListVectorArrayView')
diff --git a/src/pymor/vectorarrays/numpy.py b/src/pymor/vectorarrays/numpy.py
index 45d847630..1244e5961 100644
--- a/src/pymor/vectorarrays/numpy.py
+++ b/src/pymor/vectorarrays/numpy.py
@@ -68,6 +68,8 @@ class NumpyVectorArray(VectorArray):
         return self._len
 
     def __getitem__(self, ind):
+        if isinstance(ind, Number) and (ind >= self._len or ind < -self._len):
+            raise IndexError('VectorArray index out of range')
         return NumpyVectorArrayView(self, ind)
 
     def __delitem__(self, ind):
@@ -460,7 +462,10 @@ class NumpyVectorArrayView(NumpyVectorArray):
         return self.base.len_ind(self.ind)
 
     def __getitem__(self, ind):
-        return self.base[self.base.sub_index(self.ind, ind)]
+        try:
+            return self.base[self.base.sub_index(self.ind, ind)]
+        except IndexError:
+            raise IndexError('VectorArray index out of range')
 
     def __delitem__(self):
         raise ValueError('Cannot remove from NumpyVectorArrayView')

Making VectorArrays iterable
There is already some work done in the `va_iteration` branch, modifying [`__getitem__`](https://docs.python.org/3/reference/datamodel.html#object.__getitem__) to raise `IndexError` for illegal indices.
diff --git a/src/pymortests/vectorarray.py b/src/pymortests/vectorarray.py
index eb5e4601a..1b1c68269 100644
--- a/src/pymortests/vectorarray.py
+++ b/src/pymortests/vectorarray.py
@@ -932,6 +932,13 @@ def test_imul_wrong_factor(vector_array):
     with pytest.raises(Exception):
         vector_array *= vector_array
 
+@pyst.given_vector_arrays()
+def test_iter(vector_array):
+    v = vector_array
+    w = v.empty()
+    for vv in v:
+        w.append(vv)
+    assert np.all(almost_equal(w, v))
 
 ########################################################################################################################
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio hypothesis setuptools
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
coverage==7.8.0
Cython==3.0.12
diskcache==5.6.3
docopt-ng==0.9.0
exceptiongroup==1.2.2
execnet==2.1.1
hypothesis==6.130.5
iniconfig==2.1.0
numpy==2.0.2
packaging==24.2
pluggy==1.5.0
-e git+https://github.com/pymor/pymor.git@d7b624f892daa4194b4504e753d198461626aaa0#egg=pymor
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-runner==6.0.1
pytest-xdist==3.6.1
Qt.py==1.4.2
scipy==1.13.1
sortedcontainers==2.4.0
tomli==2.2.1
types-pyside2==5.15.2.1.7
typing_extensions==4.13.0

name: pymor
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - coverage==7.8.0
      - cython==3.0.12
      - diskcache==5.6.3
      - docopt-ng==0.9.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - hypothesis==6.130.5
      - iniconfig==2.1.0
      - numpy==2.0.2
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-runner==6.0.1
      - pytest-xdist==3.6.1
      - qt-py==1.4.2
      - scipy==1.13.1
      - setuptools==49.1.3
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - types-pyside2==5.15.2.1.7
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/pymor

src/pymortests/vectorarray.py::test_iter
src/pymortests/vectorarray.py::test_pairwise_dot src/pymortests/vectorarray.py::test_dot src/pymortests/vectorarray.py::test_dot_self src/pymortests/vectorarray.py::test_dofs src/pymortests/vectorarray.py::test_amax src/pymortests/vectorarray.py::test_pickle
src/pymortests/vectorarray.py::test_empty src/pymortests/vectorarray.py::test_print src/pymortests/vectorarray.py::test_zeros src/pymortests/vectorarray.py::test_ones src/pymortests/vectorarray.py::test_full src/pymortests/vectorarray.py::test_random_uniform src/pymortests/vectorarray.py::test_random_normal src/pymortests/vectorarray.py::test_from_numpy src/pymortests/vectorarray.py::test_shape src/pymortests/vectorarray.py::test_space src/pymortests/vectorarray.py::test_getitem_repeated src/pymortests/vectorarray.py::test_copy src/pymortests/vectorarray.py::test_copy_repeated_index src/pymortests/vectorarray.py::test_append src/pymortests/vectorarray.py::test_append_self src/pymortests/vectorarray.py::test_del src/pymortests/vectorarray.py::test_scla src/pymortests/vectorarray.py::test_axpy src/pymortests/vectorarray.py::test_axpy_one_x src/pymortests/vectorarray.py::test_axpy_self src/pymortests/vectorarray.py::test_pairwise_dot_self src/pymortests/vectorarray.py::test_lincomb_1d src/pymortests/vectorarray.py::test_lincomb_2d src/pymortests/vectorarray.py::test_lincomb_wrong_coefficients src/pymortests/vectorarray.py::test_l1_norm src/pymortests/vectorarray.py::test_l2_norm src/pymortests/vectorarray.py::test_l2_norm2 src/pymortests/vectorarray.py::test_sup_norm src/pymortests/vectorarray.py::test_components_wrong_dof_indices src/pymortests/vectorarray.py::test_gramian src/pymortests/vectorarray.py::test_add src/pymortests/vectorarray.py::test_iadd src/pymortests/vectorarray.py::test_sub src/pymortests/vectorarray.py::test_isub src/pymortests/vectorarray.py::test_neg src/pymortests/vectorarray.py::test_mul src/pymortests/vectorarray.py::test_mul_wrong_factor src/pymortests/vectorarray.py::test_rmul src/pymortests/vectorarray.py::test_imul src/pymortests/vectorarray.py::test_imul_wrong_factor src/pymortests/vectorarray.py::test_append_incompatible src/pymortests/vectorarray.py::test_axpy_incompatible src/pymortests/vectorarray.py::test_dot_incompatible src/pymortests/vectorarray.py::test_pairwise_dot_incompatible src/pymortests/vectorarray.py::test_add_incompatible src/pymortests/vectorarray.py::test_iadd_incompatible src/pymortests/vectorarray.py::test_sub_incompatible src/pymortests/vectorarray.py::test_isub_incompatible src/pymortests/vectorarray.py::test_wrong_ind_raises_exception src/pymortests/vectorarray.py::test_scal_wrong_coefficients src/pymortests/vectorarray.py::test_axpy_wrong_coefficients
src/pymor/vectorarrays/list.py src/pymor/vectorarrays/numpy.py
src/pymor/vectorarrays/list.py src/pymor/vectorarrays/numpy.py