Skip to content

Releases: legend-exp/legend-pydataobj

v1.9.0

14 Aug 08:03
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.8.1...v1.9.0

v1.8.1

25 Jul 13:46
3c29260
Compare
Choose a tag to compare

What's Changed

  • Require pint v>0.24 by @iguinn in #99
  • Added test+fix for read multiple files with core.read by @iguinn in #101

Full Changelog: v1.8.0...v1.8.1

v1.8.0

08 Jul 09:20
5fbe2f2
Compare
Choose a tag to compare

What's Changed

  • Replace file/name with hdf5 group/dataset when decoding by @iguinn in #97

Full Changelog: v1.7.1...v1.8.0

v1.7.1

02 Jul 12:32
d050bf7
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.7.0...v1.7.1

v1.7.0

08 May 12:14
9646e5a
Compare
Choose a tag to compare

What's Changed

  • Revert "Switch to LZF as default HDF5 compression" by @gipert in #88
  • Support resizing of n-dimensional VectorOfVectors by @gipert in #90
  • Allow declaring Tables with Pandas DataFrames or Awkward Arrays by @gipert in #87
  • add dataset details to lh5.tools.show by @lvarriano in #89

Full Changelog: v1.6.2...v1.7.0

v1.6.2

01 May 12:27
f26be5b
Compare
Choose a tag to compare

What's Changed

  • Switch to LZF as default HDF5 compression by @gipert in #84
  • Bug fix: support LH5 read/write of array<n>{...} where n > 1 by @gipert in #85

Full Changelog: v1.6.1...v1.6.2

v1.6.1

22 Apr 14:07
97a16a5
Compare
Choose a tag to compare

What's Changed

  • Bug fix: partially filled VectorOfVectors buffers in LH5 read operations are invalid by @gipert in #83

Full Changelog: v1.6.0...v1.6.1

v1.6.0

12 Apr 16:17
a483bcd
Compare
Choose a tag to compare

What's new

  • Concatenate array-like LGDOs on disk with l5hconcat
  • Read/write VectorOfVectors of any dimensionality
  • Read/write LGDOs without the need of a store with lgdo.lh5.read() and lgdo.lh5.write().

Have a look at the updated tutorials for more information.

Detailed list

  • lh5concat: Command line tool to concatenate array-like LGDOs in a single file by @gipert in #73
  • Support VectorOfVectors of arbitrary dimensionality (as per LH5 spec) by @gipert in #75
  • Support using nested table fields in Table.eval() by @gipert in #81
  • Refactor LH5Store.{read,write}() by @gipert in #79
  • chore: update pre-commit hooks by @pre-commit-ci in #80

Full Changelog: v1.5.1...v1.6.0

v1.5.1

01 Mar 10:36
Compare
Choose a tag to compare

Important

Releasing this patch version because of a technical problem with PyPI. Please refer to release notes for v1.5.0.

v1.5.0

01 Mar 09:35
664881f
Compare
Choose a tag to compare

What's Changed

Warning

The LH5 I/O routines have been refactored! Some function names have changed and new methods for loading and viewing data have been added. Read the migration guide below for more details. This release is fully backward compatible, but deprecation warnings will show up when using the old methods. Upgrade to the new recommended syntax to suppress them.

NEW: the package now offers support for viewing LGDO data (Tables, in particular) as Awkward arrays through the LGDO.view_as() interface. Awkward Array is a library for nested, variable-sized data, including arbitrary-length lists, records, mixed types, and missing data, using NumPy-like idioms.

Please consult the API documentation on https://legend-pydataobj.readthedocs.io to learn about the new methods.

Migration Guide

Imports

LH5 I/O related routines have been moved to a dedicated subpackage: lgdo.lh5

Old syntax:

from lgdo.lh5_store import LH5Store, ls
store = LH5Store()
ls("file.lh5")

New recommended syntax:

from lgdo import lh5
store = lh5.LH5Store()
lh5.ls("file.lh5")

Read/write LGDOs to disk

Old syntax:

store = LH5Store()
obj, _ = store.read_object("obj", "file.lh5")
store.write_object(obj, "obj", "file.lh5")

New syntax:

store = lh5.LH5Store()
obj, _ = store.read("obj", "file.lh5")
store.write(obj, "obj", "file.lh5")

Convert LGDO to another format

LGDO.view_as() is the new recommended way to view (i.e. without performing a copy) LGDOs in alternative formats (Pandas, Numpy, Awkward...)

Old syntax:

table = Table(...)
table.get_dataframe()

New syntax:

table.view_as("pd")

Old syntax:

from lgdo.lh5_store import load_nda, load_dfs
load_nda("file.lh5", ["obj"])
load_dfs("file.lh5", ["tbl"])

New syntax:

from lgdo import lh5
lh5.read_as("obj", "file.lh5", library="np")
lh5.read_as("obj", "file.lh5", library="pd")

New syntax (longer alternative):

from lgdo import lh5
store = lh5.LH5Store()

obj, _ = store.read("obj", "file.lh5")
obj.view_as("np")

tbl, _ = store.read("tbl", "file.lh5")
tbl.view_as("pd")

Full list of changes

  • Fixed bug in LH5Iterator when number of entries for file is zero by @iguinn in #39
  • Refactor of LH5 I/O routines, deprecation of existing methods by @MoritzNeuberger in #24
  • Support (environment) variables for tweaking Numba at runtime by @gipert in #44
  • Add vectorized operations to VectorOfVectors by @iguinn in #42
  • Add LGDO format conversion utilities by @MoritzNeuberger in #30
  • Added depth option to show and lh5ls by @iguinn in #52
  • Reimplement Table.eval(), now handling VectorOfVectors by @gipert in #53
  • Deprecate load_nda() and load_dfs() in favour of .view_as() by @gipert in #56
  • Support setting a fill value when "exploding" VectorOfVectors into NumPy arrays in .view_as("np") by @gipert in #57
  • Migrate to pyproject.toml, upgrade pre-commit config by @gipert in #59
  • Fix for reading just first row of VectorOfVectors by @ggmarshall in #63
  • Feature: lh5.read_as() to read LH5 data straight into third party data views by @gipert in #62
  • Added warning when adding a column to a table with different length by @MoritzNeuberger in #58
  • Add first version of CITATION.cff by @gipert in #64
  • Bug fix in LH5Store.read(): check for n_rows longer than idxs before dropping by @ggmarshall in #65
  • Bugfix for varlen error msgs and specify nda in view_as "ak" so dtype correctly inferred by @ggmarshall in #67
  • Add Patrick to CITATION.cff by @gipert in #68
  • Table.view_as() performance fixes by @gipert in #70

New Contributors

Full Changelog: v1.4.2...v1.5.0