Skip to content

Commit 6d27e32

Browse files
committed
better docstrings
1 parent 69993e3 commit 6d27e32

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

larray/core/array.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,12 @@ def __iter__(self):
349349

350350
# TODO: rename to LArrayIndexIndexer or something like that
351351
class LArrayPositionalIndexer(object):
352-
__slots__ = ('array',)
353352
"""
354-
numpy indexing *except* we index the cross product
353+
equivalent to numpy indexing when indexing along a single axis *but* indexes the cross product of multiple axes
354+
instead of points
355355
"""
356+
__slots__ = ('array',)
357+
356358
def __init__(self, array):
357359
self.array = array
358360

@@ -1066,8 +1068,7 @@ def i(self):
10661068
@lazy_attribute
10671069
def points(self):
10681070
r"""
1069-
Allows selection of arbitrary items in the array
1070-
based on their N-dimensional label index.
1071+
Allows selection of arbitrary items in the array based on their N-dimensional label index.
10711072
10721073
Examples
10731074
--------
@@ -1084,6 +1085,9 @@ def points(self):
10841085
To select the two points with label coordinates
10851086
[a0, b0, c0] and [a1, b2, c2], you must do:
10861087
1088+
>>> arr.points[['a0', 'a1'], ['b0', 'b2'], ['c0', 'c2']]
1089+
a_b_c a0_b0_c0 a1_b2_c2
1090+
0 22
10871091
>>> arr.points['a0,a1', 'b0,b2', 'c0,c2']
10881092
a_b_c a0_b0_c0 a1_b2_c2
10891093
0 22

0 commit comments

Comments
 (0)