Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 6 additions & 33 deletions doc/source/changes/version_0_35.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Syntax changes
^^^^^^^^^^^^^^

* renamed ``Array.old_method_name()`` to :py:obj:`Array.new_method_name()` (closes :issue:`1`).

* renamed ``stacked`` argument of :py:obj:`Array.plot()` to ``stack``. This
also impacts all the relevant kind-specific sub-methods
(:py:obj:`Array.plot.area()`, :py:obj:`Array.plot.bar()`,
Expand All @@ -25,8 +23,10 @@ Backward incompatible changes
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.

* Using :py:obj:`CheckedSession`, :py:obj:`CheckedParameters` or :py:obj:`CheckedArray`
now requires to install pydantic >= 2.12 (closes :issue:`1075`).
* Using :py:obj:`CheckedSession`, :py:obj:`CheckedParameters` or
:py:obj:`CheckedArray` now requires installing pydantic >= 2.12
(closes :issue:`1075`).


New features
^^^^^^^^^^^^
Expand All @@ -49,40 +49,13 @@ New features
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:
* 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.

Here is an example of the new feature:

>>> arr = ndtest((2, 3))
>>> arr
a\b b0 b1 b2
a0 0 1 2
a1 3 4 5

And it can also be used like this:

>>> arr = ndtest("a=a0..a2")
>>> arr
a a0 a1 a2
0 1 2

* added another feature in the editor (closes :editor_issue:`1`).

.. note::

- It works for foo bar !
- It does not work for foo baz !


.. _misc:

Miscellaneous improvements
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -144,4 +117,4 @@ Fixes

* 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`).
the evaluation until the larger array is known (closes :issue:`1129`).
11 changes: 8 additions & 3 deletions larray/core/checked.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,14 @@ def __new__(mcs, cls_name: str, bases: tuple[type[Any], ...], namespace: dict[st
raw_annotations = namespace.get('__annotations__', {})

# tries to infer types for variables without type hints
keys_to_infer_type = [key for key in namespace.keys() if key not in raw_annotations]
keys_to_infer_type = [key for key in keys_to_infer_type if is_valid_field_name(key)]
keys_to_infer_type = [key for key in keys_to_infer_type if key not in {'model_config', 'dict'}]
keys_to_infer_type = [key for key in namespace.keys()
if key not in raw_annotations]
keys_to_infer_type = [key for key in keys_to_infer_type
if is_valid_field_name(key)]
keys_to_infer_type = [key for key in keys_to_infer_type
if key not in {'model_config', 'dict', 'build'}]
keys_to_infer_type = [key for key in keys_to_infer_type
if not callable(namespace[key])]
for key in keys_to_infer_type:
value = namespace[key]
raw_annotations[key] = type(value)
Expand Down
Loading