class_docstr: Tests `strided_moving_window` function defined in `darts.utils.data.tabularization`.
docstr: Checks that appropriate error is thrown when `axis`
  is set to a non-`int` value, or a value not less than
  `x.ndim`.
docstr_tok: ["Checks","that","appropriate","error","is","thrown","when","`","axis","`","is","set","to","a","non-","`","int","`","value",",","or","a","value","not","less","than","`","x.ndim","`","."]
code: def test_strided_moving_window_pass_invalid_axis_error(self):
      """
      Checks that appropriate error is thrown when `axis`
      is set to a non-`int` value, or a value not less than
      `x.ndim`.
      """
      x = np.arange(1)
      # `axis` NOT an int:
      with pytest.raises(ValueError) as err:
          strided_moving_window(x, window_len=1, stride=1, axis=0.1)
      assert (
          "`axis` must be an `int` that is less than `x.ndim`."
      ) == str(err.value)
      # `axis` NOT < x.ndim:
      with pytest.raises(ValueError) as err:
          strided_moving_window(x, window_len=1, stride=1, axis=1)
      assert (
          "`axis` must be an `int` that is less than `x.ndim`."
      ) == str(err.value)
  
file_path: darts/darts/tests/utils/tabularization/test_strided_moving_window.py
imports: from itertools import product
  import numpy
  import pytest
  from darts.utils.data.tabularization import strided_moving_window
label_desc: Use image node_id 4 for calling the TestStridedMovingWindow obj's underlying member method code with example usage: obj.test_strided_moving_window_pass_invalid_axis_error() without return types