Skip to content

Commit

Permalink
prepare for 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqshihadah committed Aug 20, 2024
1 parent bf2f646 commit 27f2a0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ performing an aggregation function over these values::

Version Notes
=============
0.1.1 (TBD)
0.1.1 (2024-08-20)
-------------------
* Addition of array-like, dataframe label-based, and callable ``length`` parameter options to the ``EventsCollection.to_windows()`` method and ``distance`` parameter to the ``EventsCollection.shift()`` method. This allows for the creation of segments based on a variable length. This will be made available to other methods in future versions as well.
* Address ``numpy>=2.x`` compatibility issue in ``EventsCollection.dissolve()`` method which was causing errors in some cases. More fixes related to ``numpy`` updates are expected to come in future versions.
* Address datatype loss issues for LRS columns during ``EventsCollection.to_windows()`` and ``EventsUnion.union()`` methods. This was causing some instances of key columns to be converted to incorrect dtypes.
* Restructure .targets property to be ``keys + [beg, end]`` for more intuitive and consistent performance.
* Addition of ``min`` and ``max`` aggregation methods to the ``EventsMergeAttribute`` class.
* Several example Jupyter Notebooks for common use cases have been added to the ``examples`` folder for user reference. More to come.
* Performance improvements
* Various bug fixes, minor features

Expand Down
3 changes: 3 additions & 0 deletions linref/events/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,9 @@ def dissolve(self, attr=None, aggs=None, agg_func=None, agg_suffix='_agg',
rc = RangeCollection(begs=begs_i, ends=ends_i, centers=None,
copy=None, sort=False)
consecutive = rc.are_consecutive(all_=False, when_one=True)
# Address numpy 2.x compatibility
if type(consecutive) is bool:
consecutive = np.array([consecutive])
splitter = (np.where(np.invert(consecutive))[0] + 1).tolist()

# Get aggregation data
Expand Down

0 comments on commit 27f2a0c

Please sign in to comment.