@@ -110,19 +110,6 @@ New features
110110* added :py:obj:`LArray.isin()` method to check whether each element of an array is contained in a list (or array) of
111111 values.
112112
113- >>> arr = ndtest((2 , 3 ))
114- >>> arr
115- a\b b0 b1 b2
116- a0 0 1 2
117- a1 3 4 5
118- >>> arr.isin([1 , 5 , 7 ])
119- a\b b0 b1 b2
120- a0 False True False
121- a1 False False True
122- >>> arr[arr.isin([1 , 5 , 7 ])]
123- a_b a0_b1 a1_b2
124- 1 5
125-
126113* implemented :py:obj:`LArray.keys()`, :py:obj:`LArray.values()` and :py:obj:`LArray.items()`
127114 methods to respectively loop on an array labels, values or (key, value) pairs.
128115
@@ -160,38 +147,8 @@ New features
160147Miscellaneous improvements
161148^^^^^^^^^^^^^^^^^^^^^^^^^^
162149
163- * implemented a simpler pattern language in :py:obj:`Axis.matching()` and :py:obj:`Group.matching()`. In addition to
164- regular expressions (which now require using the ``regexp`` argument), the two methods support the following simpler
165- patterns:
166-
167- * `?` matches any single character
168- * `*` matches any number of characters
169- * [seq] matches any character in seq
170- * [!seq] matches any character not in seq
171-
172- For example, assuming the following axis:
173-
174- >>> people = Axis([' Bruce Wayne' , ' Bruce Willis' , ' Waldo' , ' Arthur Dent' , ' Harvey Dent' ], ' people' )
175-
176- All labels starting with "A" and ending with "t" are given by:
177-
178- >>> people.matching(pattern=' A*t' )
179- people['Arthur Dent']
180-
181- All labels containing "W" and ending with "s":
182-
183- >>> people.matching(pattern=' *W*s' )
184- people['Bruce Willis']
185-
186- All labels with exactly 5 characters:
187-
188- >>> people.matching(pattern=' ?????' )
189- people['Waldo']
190-
191- All labels starting with either "A" or "B":
192-
193- >>> people.matching(pattern=' [AB]*' )
194- people['Bruce Wayne', 'Bruce Willis', 'Arthur Dent']
150+ * implemented the same "simpler pattern language" in :py:obj:`Axis.matching()` and :py:obj:`Group.matching()` than in
151+ :py:obj:`Session.filter()`, in addition to regular expressions (which now require using the ``regexp`` argument).
195152
196153* :py:obj:`LArray.set_labels()` can now take functions to transform axes labels (closes :issue:`536 `).
197154
@@ -284,50 +241,8 @@ Miscellaneous improvements
284241
285242* added :py:obj:`set_options` allowing to set options for larray within a ``with`` block or globally:
286243
287- >>> from larray import *
288- >>> arr = ndtest((500 , 100 ), dtype=float) + 0.123456
289-
290- You can use ``set_options`` either as a context manager:
291-
292- >>> # display_width defines the maximum display width when printing an array
293- >>> # display_edgeitems defines the number of lines of the header and tail to display
294- >>> with set_options (display_width=100 , display_edgeitems=2 ):
295- ... print(arr)
296- a\b b0 b1 b2 ... b97 b98 b99
297- a0 0.123456 1.123456 2.123456 ... 97.123456 98.123456 99.123456
298- a1 100.123456 101.123456 102.123456 ... 197.123456 198.123456 199.123456
299- ... ... ... ... ... ... ... ...
300- a498 49800.123456 49801.123456 49802.123456 ... 49897.123456 49898.123456 49899.123456
301- a499 49900.123456 49901.123456 49902.123456 ... 49997.123456 49998.123456 49999.123456
302-
303- Or to set global options:
304-
305- >>> # display_maxlines defines the maximum number of lines to show
306- >>> # display_precision defines the number of digits of precision for floating point output
307- >>> set_options (display_maxlines=10 , display_precision=2 )
308- >>> print(arr)
309- a\b b0 b1 b2 ... b97 b98 b99
310- a0 0.12 1.12 2.12 ... 97.12 98.12 99.12
311- a1 100.12 101.12 102.12 ... 197.12 198.12 199.12
312- a2 200.12 201.12 202.12 ... 297.12 298.12 299.12
313- a3 300.12 301.12 302.12 ... 397.12 398.12 399.12
314- a4 400.12 401.12 402.12 ... 497.12 498.12 499.12
315- ... ... ... ... ... ... ... ...
316- a495 49500.12 49501.12 49502.12 ... 49597.12 49598.12 49599.12
317- a496 49600.12 49601.12 49602.12 ... 49697.12 49698.12 49699.12
318- a497 49700.12 49701.12 49702.12 ... 49797.12 49798.12 49799.12
319- a498 49800.12 49801.12 49802.12 ... 49897.12 49898.12 49899.12
320- a499 49900.12 49901.12 49902.12 ... 49997.12 49998.12 49999.12
321-
322- To put back the default options, you can use:
323-
324- >>> set_options(display_precision=None, display_width=80 , display_maxlines=200 , display_edgeitems=5 )
325-
326244 The :py:obj:`get_options` function returns a view of the current options as a dictionary:
327245
328- >>> get_options()
329- {' display_precision' : None, ' display_width' : 80 , ' display_maxlines' : 200 , ' display_edgeitems' : 5 }
330-
331246 Closes :issue:`274`.
332247
333248* improved speed of :py:obj:`read_hdf()` function when reading a stored LArray object dumped with
0 commit comments