Skip to content

Commit 4538236

Browse files
committed
removed example code from the changelog for new features (they are one click away anyway)
I kept them for improvements because in that case the examples for that specific change are usually buried in a lot of other code.
1 parent c1114a6 commit 4538236

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

doc/source/changes/version_0_30.rst.inc

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -284,50 +271,8 @@ Miscellaneous improvements
284271

285272
* added :py:obj:`set_options` allowing to set options for larray within a ``with`` block or globally:
286273

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-
326274
The :py:obj:`get_options` function returns a view of the current options as a dictionary:
327275

328-
>>> get_options()
329-
{'display_precision': None, 'display_width': 80, 'display_maxlines': 200, 'display_edgeitems': 5}
330-
331276
Closes :issue:`274`.
332277

333278
* improved speed of :py:obj:`read_hdf()` function when reading a stored LArray object dumped with

0 commit comments

Comments
 (0)