-
Notifications
You must be signed in to change notification settings - Fork 6
Add change log for version 0.21 #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add change log for version 0.21 #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be missing two improvements:
-
tag multiple groups with an axis in one shot (backward incompatible)
-
improved LArray.plot to get nicer plots by default.
The axes are transposed compared to what they used to, because the last axis is often used for time series. Also it considers a 1D array like a single series, not N series of 1 point.
New features | ||
------------ | ||
|
||
* implemented replaced_axes() method to replace one, several or all axes of an array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo... replaced -> replace
|
||
* readme.rst + doc : add installation instructions (closes :issue:`101`). | ||
|
||
* allowed to use regex in split_axis method (closes :issue:`106`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"regex" -> "a regular expression"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could also be considered a new feature...
a0 | 0 | 1 | 2 | ||
a1 | 3 | 4 | 5 | ||
|
||
* allowed multiplication (__matmul__ or @ operator) between matrices with dimension != 2 (closes :issue:`122`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowed matrix multiplication (@ operator) between arrays with dimension != 2?
|
||
* implemented Axis.by() which is equivalent to axis[:].by() | ||
|
||
* viewer : automatically display plots done in the viewer console in a separate window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarify "using plot methods"? (and possibly add an example)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"using plot methods" ? Example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by "using plot methods" I mean using array.plot() or array.plot.XXX() (by opposition to using Ctrl-P or the array widget context menu to create the plot)
Concerning the example, something like:
>>> a = ndtest((2, 3))
>>> a.plot()
* viewer: allow changing the number of displayed digits even for integer arrays as that makes sense when using | ||
scientific notation (closes :issue:`100`). | ||
|
||
* viewer : make shortcuts work even when the focus is not on the array editor widget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't consider this a bug fixed, but an improvement, but well this is subjective :)
Miscellaneous improvements | ||
-------------------------- | ||
|
||
* readme.rst + doc : add installation instructions (closes :issue:`101`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- not sure mentioning "readme.rst + doc" is worth it.
- add -> added to be consistent with the rest.
nat\sex | M | F | ||
BE | 0 | 1 | ||
FO | 2 | 3 | ||
>>> from_string('''age,nat\\sex, M, F |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't a single example enough to get the point across? Unsure whether we need the 3D or 2D one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep only for 3D
|
||
* allowed multiplication (__matmul__ or @ operator) between matrices with dimension != 2 (closes :issue:`122`). | ||
|
||
* implemented Axis.by() which is equivalent to axis[:].by() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a new feature, right?
------------ | ||
|
||
* implemented replaced_axes() method to replace one, several or all axes of an array | ||
(instead of using the workaround a.with_axes(a.axes.replace(...))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should mention somewhere that with_axes is deprecated.
|
||
* implemented replaced_axes() method to replace one, several or all axes of an array | ||
(instead of using the workaround a.with_axes(a.axes.replace(...))) | ||
(closes :issue:`67`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, to replace some axes but not all, one had to use a.with_axes(a.axes.replace(...))
? tag multiple groups with an axis in one shot (backward incompatible) ? |
concerning "tag multiple groups": 70cffbb Gaëtan de Menten [email protected] on 2017-01-24 at 16:50 |
1a1152d
to
5f62f04
Compare
a1 | 3 | 4 | 5 | ||
>>> row = Axis('row', ['r0', 'r1']) | ||
>>> column = Axis('column', ['c0', 'c1', 'c2']) | ||
Replace one axis (second argument `new_axis` must be provided) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better with some blank lines in there like in a real doctest?
row\\column | c0 | c1 | c2 | ||
r0 | 0 | 1 | 2 | ||
r1 | 3 | 4 | 5 | ||
>>> arr.set_axes({x.a: row, x.b: column}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the later two syntaxes shouldn't be put behind a "equivalent syntaxes" comment so that we can remove the result and make the changelog shorter to not loose our users interest right at the first change :)
* added possibility to tag multiple groups with an axis in one shot (backward incompatible) | ||
|
||
>>> year = Axis('year', '2001 .. 2010') | ||
>>> year.group('2001,2002;2003:2008;2009,2010') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should deprecate .group (see #148), and the commit actually included two distinct changes:
- interpret string syntax in axis[a_string], which means you can do:
>>> year = Axis('year', '2001..2010')
>>> year['2001:2004']
year[2001:2004]
- change the axis of multiple groups via a single axis[groups]
>>> groups = year[2001:2004], year[2008,2009]
>>> groups
(year[2001:2004], year[2008, 2009])
>>> x.time[groups]
(x.time[2001:2004], x.time[2008, 2009])
However (and this is a bit silly that I did not make it work -- but to my defense, I did not expect you to merge that PR), what you used as an example is broken at this point, because the result is not a valid index in an array:
>>> year['2001:2004;2008;2009']
year[slice(2001, 2004, None), [2008, 2009]]
>>> arr = ndrange(year)
>>> arr.sum(year['2001:2004;2008,2009'])
TypeError Traceback (most recent call last)
...
TypeError: unhashable type: 'slice'
>>> # this works though
... arr.sum(tuple(year['2001:2004;2008,2009']))
year | 2001:2004 | 2008,2009
| 6 | 15
larray/core.py
Outdated
@@ -3976,14 +3976,16 @@ def replace_axes(self, axes_to_replace=None, new_axis=None, **kwargs): | |||
a1 | 3 | 4 | 5 | |||
>>> row = Axis('row', ['r0', 'r1']) | |||
>>> column = Axis('column', ['c0', 'c1', 'c2']) | |||
|
|||
Replace one axis (expect 2 arguments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you sync this line with the corresponding one in the release notes?
5f62f04
to
72a33d6
Compare
The axes are transposed compared to what they used to, because the last axis is often used for time series. | ||
Also it considers a 1D array like a single series, not N series of 1 point. | ||
|
||
* added possibility to tag multiple groups with an axis in one shot (backward incompatible) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this paragraph should be killed
72a33d6
to
9cebd44
Compare
LGTM |
Based on Git logs.