Skip to content

Commit 9a5ee0f

Browse files
committed
misc improvements to changelog
added more explanations for a few points, and moved stuff around
1 parent 3372fb9 commit 9a5ee0f

File tree

1 file changed

+46
-34
lines changed

1 file changed

+46
-34
lines changed

doc/source/changes/version_0_22.rst.inc

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
New features
22
------------
33

4-
* implemented a new describe() method on arrays to give quick summary statistics (excluding NaN values). By default,
5-
it includes the number of values, mean, standard deviation, minimum, 25, 50 and 75 percentiles and maximum.
4+
* viewer: added a menu bar with the ability to clear the current session, save all its arrays to a file (.h5, .xlsx,
5+
.pkl or a directory containing multiple .csv files), and load arrays from such a file (closes :issue:`88`).
6+
7+
WARNING: Only array objects are currently saved. It means that scalars, functions or others non-LArray objects
8+
defined in the console are *not* saved in the file.
9+
10+
* implemented a new describe() method on arrays to give quick summary statistics. By default, it includes the number of
11+
non-NaN values, the mean, standard deviation, minimum, 25, 50 and 75 percentiles and maximum.
612

713
>>> arr = ndrange('gender=Male,Female;year=2014..2020').astype(float)
814
>>> arr
@@ -13,7 +19,7 @@
1319
statistic | count | mean | std | min | 25% | 50% | 75% | max
1420
| 14.0 | 6.5 | 4.031128874149275 | 0.0 | 3.25 | 6.5 | 9.75 | 13.0
1521

16-
an optional keyword argument allow to specify different percentiles to include
22+
an optional keyword argument allows to specify different percentiles to include
1723

1824
>>> arr.describe(percentiles=[20, 40, 60, 80])
1925
statistic | count | mean | std | min | 20% | 40% | 60% | 80% | max
@@ -34,7 +40,7 @@
3440

3541
This closes :issue:`184`.
3642

37-
* implemented reindex allowing to change order of labels (and add new ones) of one or several axes:
43+
* implemented reindex allowing to change the order of labels and add/remove some of them to one or several axes:
3844

3945
>>> arr = ndtest((2, 2))
4046
>>> arr
@@ -52,12 +58,26 @@
5258
a1 | -1 | 3 | 2
5359
a2 | -1 | -1 | -1
5460
a0 | -1 | 1 | 0
61+
62+
using reindex one can make an array compatible with another array which has more/less labels or with labels in a
63+
different order:
64+
5565
>>> arr2 = ndtest((3, 3))
56-
>>> arr.reindex(arr2.axes, fill_value=-1)
66+
>>> arr2
5767
a\\b | b0 | b1 | b2
58-
a0 | 0 | 1 | -1
59-
a1 | 2 | 3 | -1
60-
a2 | -1 | -1 | -1
68+
a0 | 0 | 1 | 2
69+
a1 | 3 | 4 | 5
70+
a2 | 6 | 7 | 8
71+
>>> arr.reindex(arr2.axes, fill_value=0)
72+
a\\b | b0 | b1 | b2
73+
a0 | 0 | 1 | 0
74+
a1 | 2 | 3 | 0
75+
a2 | 0 | 0 | 0
76+
>>> arr.reindex(arr2.axes, fill_value=0) + arr2
77+
a\\b | b0 | b1 | b2
78+
a0 | 0 | 2 | 2
79+
a1 | 5 | 7 | 5
80+
a2 | 6 | 7 | 8
6181

6282
This closes :issue:`18`.
6383

@@ -85,14 +105,6 @@
85105

86106
* viewer: added possibility to delete an array by pressing Delete on keyboard (closes :issue:`116`).
87107

88-
* viewer: added a menu bar 'File' with options 'New', 'Open', 'Save', 'SaveAs', 'Open Recent' and 'Quit'.
89-
90-
WARNING: Only LArray objects are saved.
91-
92-
(closes :issue:`88`)
93-
94-
* renamed dump, dump_hdf, dump_excel and dump_csv methods of class Session as save, to_hdf, to_excel and to_csv
95-
(closes :issue:`217`)
96108

97109
.. _misc:
98110

@@ -108,6 +120,8 @@ Miscellaneous improvements
108120

109121
(closes :issue:`152`)
110122

123+
* renamed Session.dump, dump_hdf, dump_excel and dump_csv to save, to_hdf, to_excel and to_csv (closes :issue:`217`).
124+
111125
* changed default value of `ddof` argument for var and std functions from 0 to 1 (closes :issue:`190`).
112126

113127
* implemented a new syntax for stack(): `stack({label1: value1, label2: value2}, axis)`
@@ -193,6 +207,16 @@ Miscellaneous improvements
193207
Axis(['c0', 'c1', 'c2'], 'column')
194208
])
195209

210+
* added possibility to delete an array from a session:
211+
212+
>>> s = Session({'a': ndtest((3, 3)), 'b': ndtest((2, 4)), 'c': ndtest((4, 2))})
213+
>>> s.names
214+
['a', 'b', 'c']
215+
>>> del s.b
216+
>>> del s['c']
217+
>>> s.names
218+
['a']
219+
196220
* made create_sequential axis argument accept axis definitions in addition to Axis objects like, for example, using a
197221
string definition (closes :issue:`160`).
198222

@@ -222,30 +246,22 @@ Miscellaneous improvements
222246

223247
will autocomplete to `s.a_nice_test_array` and `s['a_<tab>` will be completed to `s['a_nice_test_array`
224248

225-
* added possibility to delete an array from a session:
226-
227-
>>> s = Session({'a': ndtest((3, 3)), 'b': ndtest((2, 4)), 'c': ndtest((4, 2))})
228-
>>> s.names
229-
['a', 'b', 'c']
230-
>>> del s.b
231-
>>> del s['c']
232-
>>> s.names
233-
['a']
234-
235249
* made warning messages for division by 0 and invalid values (usually caused by 0 / 0) point to the user code line,
236250
instead of the corresponding line in the larray module.
237251

252+
* preserve order of arrays in a session when saving to/loading from an .xlsx file.
253+
254+
* when creating a session from a directory containing CSV files, the directory may now contain other (non-CSV) files.
255+
238256

239257
Fixes
240258
-----
241259

242260
* fixed keyword arguments such as `out`, `ddof`, ... for aggregation functions (closes :issue:`189`).
243261

244-
* fixed percentile(_by) with multiple percentiles values (i.e. when argument `q` is a list/tuple).
245-
(closes :issue:`192`)
262+
* fixed percentile(_by) with multiple percentiles values, i.e. when argument `q` is a list/tuple (closes :issue:`192`).
246263

247-
* fixed group aggregates on integer arrays for median, percentile, var and std
248-
(closes :issue:`193`).
264+
* fixed group aggregates on integer arrays for median, percentile, var and std (closes :issue:`193`).
249265

250266
* fixed group sum over boolean arrays (closes :issue:`194`).
251267

@@ -259,8 +275,4 @@ Fixes
259275
* fixed Workbook behavior in case of new workbook: the first added sheet replaces the default sheet `Sheet1`
260276
(closes :issue:`230`).
261277

262-
* fixed order of arrays in sessions loaded from files. The order is now the same as in the file.
263-
264-
* fixed loading session from CSV files in a directory. The directory may contain other non-csv files.
265-
266278
* fixed with_axes warning to refer to set_axes instead of replace_axes.

0 commit comments

Comments
 (0)