Skip to content

Commit 2e4e645

Browse files
committed
>> replaced r""" by """ in doc_varargs declaration + updated split_axes()
1 parent 3e48e57 commit 2e4e645

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

larray/core/array.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7575,7 +7575,7 @@ def combine_axes(self, axes=None, sep='_', wildcard=False):
75757575
return transposed.reshape(new_axes)
75767576

75777577
def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fill_value=nan):
7578-
"""Split axes and returns a new array
7578+
r"""Split axes and returns a new array
75797579
75807580
Parameters
75817581
----------
@@ -7606,15 +7606,15 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
76067606
--------
76077607
>>> arr = ndtest((2, 3))
76087608
>>> arr
7609-
a\\b b0 b1 b2
7609+
a\b b0 b1 b2
76107610
a0 0 1 2
76117611
a1 3 4 5
76127612
>>> combined = arr.combine_axes()
76137613
>>> combined
76147614
a_b a0_b0 a0_b1 a0_b2 a1_b0 a1_b1 a1_b2
76157615
0 1 2 3 4 5
76167616
>>> combined.split_axes()
7617-
a\\b b0 b1 b2
7617+
a\b b0 b1 b2
76187618
a0 0 1 2
76197619
a1 3 4 5
76207620
@@ -7624,23 +7624,23 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
76247624
>>> combined
76257625
a_b a0b0 a0b1 a0b2 a1b0 a1b1 a1b2
76267626
0 1 2 3 4 5
7627-
>>> combined.split_axes('a_b', regex=r'(\\w{2})(\\w{2})')
7628-
a\\b b0 b1 b2
7627+
>>> combined.split_axes('a_b', regex=r'(\w{2})(\w{2})')
7628+
a\b b0 b1 b2
76297629
a0 0 1 2
76307630
a1 3 4 5
76317631
76327632
Split several axes at once
76337633
76347634
>>> combined = ndtest('a_b=a0_b0..a1_b1; c_d=c0_d0..c1_d1')
76357635
>>> combined
7636-
a_b\\c_d c0_d0 c0_d1 c1_d0 c1_d1
7636+
a_b\c_d c0_d0 c0_d1 c1_d0 c1_d1
76377637
a0_b0 0 1 2 3
76387638
a0_b1 4 5 6 7
76397639
a1_b0 8 9 10 11
76407640
a1_b1 12 13 14 15
76417641
>>> # equivalent to combined.split_axes() which split all axes whose name contains the `sep` delimiter.
76427642
>>> combined.split_axes(['a_b', 'c_d'])
7643-
a b c\\d d0 d1
7643+
a b c\d d0 d1
76447644
a0 b0 c0 0 1
76457645
a0 b0 c1 2 3
76467646
a0 b1 c0 4 5
@@ -7650,7 +7650,7 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
76507650
a1 b1 c0 12 13
76517651
a1 b1 c1 14 15
76527652
>>> combined.split_axes({'a_b': ('A', 'B'), 'c_d': ('C', 'D')})
7653-
A B C\\D d0 d1
7653+
A B C\D d0 d1
76547654
a0 b0 c0 0 1
76557655
a0 b0 c1 2 3
76567656
a0 b1 c0 4 5

larray/core/axis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,7 +3211,7 @@ def combine_axes(self, axes=None, sep='_', wildcard=False, front_if_spread=False
32113211
return new_axes
32123212

32133213
def split_axes(self, axes=None, sep='_', names=None, regex=None):
3214-
"""Split axes and returns a new collection
3214+
r"""Split axes and returns a new collection
32153215
32163216
The split axes are inserted where the combined axis was.
32173217
@@ -3264,7 +3264,7 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None):
32643264
AxisCollection([
32653265
Axis(['a0b0', 'a0b1', 'a0b2', 'a1b0', 'a1b1', 'a1b2'], 'a_b')
32663266
])
3267-
>>> combined.split_axes('a_b', regex='(\\\\w{2})(\\\\w{2})')
3267+
>>> combined.split_axes('a_b', regex=r'(\w{2})(\w{2})')
32683268
AxisCollection([
32693269
Axis(['a0', 'a1'], 'a'),
32703270
Axis(['b0', 'b1', 'b2'], 'b')

0 commit comments

Comments
 (0)