summaryrefslogtreecommitdiff
path: root/tests/functional/r/recursion/recursion_error_2836.py
blob: 9be68b265661b651f3dd206b3365c1c619329010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# pylint: disable=missing-docstring
class Data:
    def __init__(self):
        self.shape = [None, 17]

    @property
    def ndim(self):
        return len(self.shape)

    def copy_move_axis(self, old_axis):
        if old_axis < 0:
            old_axis += self.ndim
            assert old_axis >= 0
        assert 0 <= old_axis < self.ndim

        new_shape = [None] * self.ndim
        self.shape = new_shape
        return self