1+ New features
2+ ------------
3+
4+ * implemented set_axes () method to replace one, several or all axes of an array (closes :issue:`67 `).
5+ The method with_axes() is now deprecated (set_axes() must be used instead).
6+
7+ >>> arr = ndtest((2 , 3 ))
8+ >>> arr
9+ a\\b | b0 | b1 | b2
10+ a0 | 0 | 1 | 2
11+ a1 | 3 | 4 | 5
12+ >>> row = Axis(' row' , [' r0' , ' r1' ])
13+ >>> column = Axis(' column' , [' c0' , ' c1' , ' c2' ])
14+
15+ Replace one axis (second argument `new_axis` must be provided)
16+
17+ >>> arr.set_axes(x.a, row)
18+ row\\b | b0 | b1 | b2
19+ r0 | 0 | 1 | 2
20+ r1 | 3 | 4 | 5
21+
22+ Replace several axes (keywords, list of tuple or dictionary)
23+
24+ >>> arr.set_axes(a=row, b=column)
25+ or
26+ >>> arr.set_axes([(x.a, row), (x.b, column)])
27+ or
28+ >>> arr.set_axes({x.a : row, x.b : column})
29+ row\\column | c0 | c1 | c2
30+ r0 | 0 | 1 | 2
31+ r1 | 3 | 4 | 5
32+
33+ Replace all axes (list of axes or AxisCollection)
34+
35+ >>> arr.set_axes([row, column])
36+ row\\column | c0 | c1 | c2
37+ r0 | 0 | 1 | 2
38+ r1 | 3 | 4 | 5
39+ >>> arr2 = ndrange([row, column])
40+ >>> arr.set_axes(arr2.axes)
41+ row\\column | c0 | c1 | c2
42+ r0 | 0 | 1 | 2
43+ r1 | 3 | 4 | 5
44+
45+ * implemented from_string() method to create an array from a string:
46+
47+ >>> from_string(' ' ' age,nat\\ sex, M, F
48+ ... 0, BE, 0, 1
49+ ... 0, FO, 2, 3
50+ ... 1, BE, 4, 5
51+ ... 1, FO, 6, 7' ' ' )
52+ age | nat\sex | M | F
53+ 0 | BE | 0 | 1
54+ 0 | FO | 2 | 3
55+ 1 | BE | 4 | 5
56+ 1 | FO | 6 | 7
57+
58+ * allowed to use a regular expression in split_axis method (closes :issue:`106 `):
59+
60+ >>> combined = ndrange(' a_b = a0b0..a1b2' )
61+ >>> combined
62+ a_b | a0b0 | a0b1 | a0b2 | a1b0 | a1b1 | a1b2
63+ | 0 | 1 | 2 | 3 | 4 | 5
64+ >>> combined.split_axis(x.a_b, regex=' (\w {2})(\w {2})' )
65+ a\\b | b0 | b1 | b2
66+ a0 | 0 | 1 | 2
67+ a1 | 3 | 4 |
68+
69+ * allowed the syntax axis[groups]:
70+
71+ >>> groups = year[2001:2004], year[2008,2009]
72+ >>> groups
73+ (year[2001 :2004 ], year[2008 , 2009 ])
74+ >>> x.time[groups]
75+ (x.time[2001 :2004 ], x.time[2008 , 2009 ])
76+
77+ Miscellaneous improvements
78+ --------------------------
79+
80+ * added installation instructions (closes :issue:`101 `).
81+
82+ * viewer : make shortcuts work even when the focus is not on the array editor widget
83+ (ie it is on the array list, or on the interactive console) (closes :issue:`102 `).
84+
85+ * allowed matrix multiplication (@ operator ) between arrays with dimension != 2 (closes :issue:`122 `).
86+
87+ * viewer : automatically display plots done in the viewer console in a separate window
88+ (unless " %matplotlib inline" is used). Plots can be done via the array widget
89+ (using shortcut CTRL+P or right click) or from the console:
90+
91+ >>> arr = ndtest((3 , 3 ))
92+ >>> arr.plot()
93+
94+ Now both methods generate a plot in separate window.
95+
96+ * improved LArray.plot to get nicer plots by default.
97+ The axes are transposed compared to what they used to, because the last axis is often used for time series.
98+ Also it considers a 1D array like a single series, not N series of 1 point.
99+
100+ * Axis.group is now deprecated (Syntax " age[10:19] >> 'teens'" must be used instead)
101+ (closes :issue:`148 `).
102+
103+ Fixes
104+ -----
105+
106+ * viewer: allow changing the number of displayed digits even for integer arrays as that makes sense when using
107+ scientific notation (closes :issue:`100 `).
108+
109+ * viewer : fixed opening a viewer via view() edit() or compare() from within the viewer
110+ (closes :issue:`109 `)
111+
112+ * viewer : fixed compare() colors when arrays have values which are very close but not exactly equal
113+ (closes :issue:`123 `)
114+
115+ * viewer : fixed legend when plotting arbitrary rows (it always displayed the labels of the first rows)
116+ (closes :issue:`136 `).
117+
118+ * fixed posargsort labels (closes :issue:`137 `).
119+
120+ * viewer : fixed xticklabels when zooming on a plot (closes :issue:`143 `)
0 commit comments