We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e7f8fa commit 03439e9Copy full SHA for 03439e9
sfs/array.py
@@ -36,6 +36,11 @@ class ArrayData(namedtuple('ArrayData', 'x n a')):
36
37
__slots__ = ()
38
39
+ def __repr__(self):
40
+ return 'ArrayData(\n' + ',\n'.join(
41
+ ' {0}={1}'.format(name, repr(data).replace('\n', '\n '))
42
+ for name, data in zip('xna', self)) + ')'
43
+
44
def take(self, indices):
45
"""Return a sub-array given by `indices`."""
46
return ArrayData(self.x[indices], self.n[indices], self.a[indices])
0 commit comments