Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f6e3324
DOC: small design note
gdementen Nov 24, 2025
9f42939
FIX: fixed reindex(axis_name=labels_def) (fixes #1120)
gdementen Nov 25, 2025
7d99016
CLN/PERF: simplified Array.eq implementation
gdementen Nov 25, 2025
d4b47fc
FEAT: implemented nan_to_num and isnan for object arrays
gdementen Nov 25, 2025
f2a5dd9
FIX: added support for Pandas Series in asarray() (fixes #895)
gdementen Apr 8, 2025
2738924
DOC: fixed typo in changelog
gdementen Nov 25, 2025
5fb3d37
FEAT: improved lazy expressions (ExprNode) reprs
gdementen Nov 26, 2025
a5ebdbc
FIX: delay binops with X.axis when not all axes available (fixes #1129)
gdementen Nov 25, 2025
6f21c0c
DOC: fix comment
gdementen Aug 17, 2025
421db84
PERF/FIX: removed chunking code
gdementen Nov 26, 2025
5ead3d3
FIX/FEAT: fixed and improved arr[array_key_with_bad_values] error mes…
gdementen Nov 26, 2025
5cf2058
CLN: moved Array.to_frame(fold_last_axis_name) from doctest to unittest
gdementen May 14, 2025
b4023b2
FEAT: implemented ncolaxes in Array.to_frame
gdementen May 14, 2025
f5f585c
PERF: slightly faster ipfp
gdementen Oct 16, 2024
1f71d34
FIX: fixed AxisCollection.index(X[0])
gdementen Mar 7, 2025
e749f1a
FIX: changed type error to TypeError
gdementen Oct 11, 2024
f5b0f2b
FEAT: added explicit check about Axis("name=labels", "name")
gdementen Nov 28, 2024
7cbee1e
SYNTAX: raise an error on Axis.id
gdementen Oct 28, 2024
58a658c
DOC: improved changelog wording and links
gdementen Nov 28, 2025
2033098
MAINT: bump minimum Python version to 3.9
gdementen Jan 22, 2025
3588c64
FEAT: implemented Session.align(other_session) (closes #501)
gdementen Jun 19, 2024
ceffdf8
DOC: added mention and test about Axis.intersection conserving duplic…
gdementen Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions condarecipe/larray/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ build:

requirements:
host:
- python >=3.7
- python >=3.9
- pip

run:
- python >=3.7
- python >=3.9
- numpy >=1.22
- pandas >=0.20

Expand Down
3 changes: 3 additions & 0 deletions design.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,9 @@ subset = pop.q('M, age.sum(10:20 >> yada1, 20:30 >> yada2'))
# without ambiguity, that would be
subset = pop.q('M, sum(10:20 >> yada1, 20:30 >> yada2'))

# this could work too:
subset = pop.q('M', sum(age[10:20] >> 'yada1', age[20:30] >> 'yada2'))

# if using a function (like .q) we could also "rename" axes on the fly. the above would create an aggregated axis
# named "age" but the code below would create "toto" instead
subset = pop.q('M', toto=age.sum[10:20, 20:30])
Expand Down
58 changes: 44 additions & 14 deletions doc/source/changes/version_0_35.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,47 @@ Syntax changes
(:py:obj:`Array.plot.area()`, :py:obj:`Array.plot.bar()`,
:py:obj:`Array.plot.barh()`, and :py:obj:`Array.plot.line()`).

* all align() methods (:py:obj:`Axis.align()`, :py:obj:`AxisCollection.align()`
and :py:obj:`Array.align()`) only take options (``join``, ``axes`` and/or
``fill_value``) as keywords arguments. Extra positional arguments will be
considered as more objects to align (see below).


Backward incompatible changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* Plots made with Array.plot() in a Python script will be shown by default,
unless either the filepath (see below) or ax arguments are used. Shown plots
will open a window and pause the running script until the window is closed by
the user. To revert to the previous behavior, use show=False.
* Plots made with :py:obj:`Array.plot()` in a Python script will be shown by
default, unless either the filepath (see below) or ax arguments are used.
Shown plots will open a window and pause the running script until the window
is closed by the user. To revert to the previous behavior, use show=False.


New features
^^^^^^^^^^^^

* Array.plot now has an ´animate´ argument to produce animated plots. The
argument takes an axis (it also supports several axes but that is rarely
useful) and will create an animation, with one image per label of that axis.
For example,
* :py:obj:`Array.plot()` now has an ``animate`` argument to produce animated
plots. The argument takes an axis (it also supports several axes but that is
rarely useful) and will create an animation, with one image per label of that
axis. For example,

>>> arr.plot.bar(animate='year')

will create an animated bar plot with one frame per year.

* implemented Array.plot `filepath` argument to save plots to a file directly,
without having to use the matplotlib API.
* implemented :py:obj:`Array.plot()` ``filepath`` argument to save plots to a
file directly, without having to use the matplotlib API.

* implemented Array.plot `show` argument to display plots directly, without
having to use the matplotlib API. This is the new default behavior.
* implemented :py:obj:`Array.plot()` ``show`` argument to display plots
directly, without having to use the matplotlib API. This is the new default
behavior, unless a ``filepath`` is given.

* implemented a new kind of plot: `heatmap`. It can be used like this:

>>> arr.plot.heatmap()

* implemented :py:obj:`Session.align()` to align all the arrays in several
sessions at once. Closes :issue:`501`.

* added a feature (see the :ref:`miscellaneous section <misc>` for details). It works on :ref:`api-axis` and
:ref:`api-group` objects.

Expand Down Expand Up @@ -79,10 +88,31 @@ Miscellaneous improvements
always stacking the last axis. For example, a plot with genders stacked
could be specified as:

>>> arr.plot.bar(stacked='gender')
>>> arr.plot.bar(stack='gender')

* :py:obj:`Array.to_frame()` gained an ``ncolaxes`` argument to control how many
axes should be used as columns (defaults to 1, as before).

* made :py:obj:`ipfp()` slightly faster when display_progress is False.

* all align() methods (:py:obj:`Axis.align()`, :py:obj:`AxisCollection.align()`
and :py:obj:`Array.align()`) now support aligning more than two objects at
once by passing them as positional arguments. For example:

>>> array1.align(array2, array3, join='outer')


Fixes
^^^^^

* fixed something (closes :issue:`1`).
* fixed error message when trying to take a subset of an array with an array
key which has ndim > 1 and some bad values in the key. The message was also
improved (see the issue for details). Closes :issue:`1134`.

* added support for Pandas Series in :py:obj:`asarray()`. This is considered a
fix because it kind of worked but silently ignored the index and name of the
series (closes :issue:`895`).

* fixed evaluating operations involving X.axis and an array when
that operation is only valid in the context of a larger array by delaying
the evaluation until the larger array is known (closes :issue:`1129`).
6 changes: 3 additions & 3 deletions larray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
from larray.core.checked import CheckedArray, CheckedSession, CheckedParameters
from larray.core.constants import nan, inf, pi, e, euler_gamma
from larray.core.metadata import Metadata
from larray.core.ufuncs import wrap_elementwise_array_func, maximum, minimum, where
from larray.core.ufuncs import wrap_elementwise_array_func, maximum, minimum, where, isnan, nan_to_num
from larray.core.npufuncs import (sin, cos, tan, arcsin, arccos, arctan, hypot, arctan2, degrees,
radians, unwrap, sinh, cosh, tanh, arcsinh, arccosh, arctanh,
angle, real, imag, conj,
round, around, rint, fix, floor, ceil, trunc,
exp, expm1, exp2, log, log10, log2, log1p, logaddexp, logaddexp2,
i0, sinc, signbit, copysign, frexp, ldexp,
convolve, clip, sqrt, absolute, fabs, sign, fmax, fmin, nan_to_num,
real_if_close, interp, isnan, isinf, inverse)
convolve, clip, sqrt, absolute, fabs, sign, fmax, fmin,
real_if_close, interp, isinf, inverse)
from larray.core.misc import isscalar

from larray.inout.misc import from_lists, from_string
Expand Down
Loading
Loading