@@ -7575,7 +7575,7 @@ def combine_axes(self, axes=None, sep='_', wildcard=False):
7575
7575
return transposed .reshape (new_axes )
7576
7576
7577
7577
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
7579
7579
7580
7580
Parameters
7581
7581
----------
@@ -7606,15 +7606,15 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
7606
7606
--------
7607
7607
>>> arr = ndtest((2, 3))
7608
7608
>>> arr
7609
- a\\ b b0 b1 b2
7609
+ a\b b0 b1 b2
7610
7610
a0 0 1 2
7611
7611
a1 3 4 5
7612
7612
>>> combined = arr.combine_axes()
7613
7613
>>> combined
7614
7614
a_b a0_b0 a0_b1 a0_b2 a1_b0 a1_b1 a1_b2
7615
7615
0 1 2 3 4 5
7616
7616
>>> combined.split_axes()
7617
- a\\ b b0 b1 b2
7617
+ a\b b0 b1 b2
7618
7618
a0 0 1 2
7619
7619
a1 3 4 5
7620
7620
@@ -7624,23 +7624,23 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
7624
7624
>>> combined
7625
7625
a_b a0b0 a0b1 a0b2 a1b0 a1b1 a1b2
7626
7626
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
7629
7629
a0 0 1 2
7630
7630
a1 3 4 5
7631
7631
7632
7632
Split several axes at once
7633
7633
7634
7634
>>> combined = ndtest('a_b=a0_b0..a1_b1; c_d=c0_d0..c1_d1')
7635
7635
>>> 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
7637
7637
a0_b0 0 1 2 3
7638
7638
a0_b1 4 5 6 7
7639
7639
a1_b0 8 9 10 11
7640
7640
a1_b1 12 13 14 15
7641
7641
>>> # equivalent to combined.split_axes() which split all axes whose name contains the `sep` delimiter.
7642
7642
>>> combined.split_axes(['a_b', 'c_d'])
7643
- a b c\\ d d0 d1
7643
+ a b c\d d0 d1
7644
7644
a0 b0 c0 0 1
7645
7645
a0 b0 c1 2 3
7646
7646
a0 b1 c0 4 5
@@ -7650,7 +7650,7 @@ def split_axes(self, axes=None, sep='_', names=None, regex=None, sort=False, fil
7650
7650
a1 b1 c0 12 13
7651
7651
a1 b1 c1 14 15
7652
7652
>>> 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
7654
7654
a0 b0 c0 0 1
7655
7655
a0 b0 c1 2 3
7656
7656
a0 b1 c0 4 5
0 commit comments