Legend-pydataobj

Latest version: v1.6.2

Safety actively analyzes 623909 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.6.2

What's Changed
* Switch to LZF as default HDF5 compression by gipert in https://github.com/legend-exp/legend-pydataobj/pull/84
* Bug fix: support LH5 read/write of `array<n>{...}` where `n` > 1 by gipert in https://github.com/legend-exp/legend-pydataobj/pull/85


**Full Changelog**: https://github.com/legend-exp/legend-pydataobj/compare/v1.6.1...v1.6.2

1.6.1

What's Changed
* Bug fix: partially filled `VectorOfVectors` buffers in LH5 read operations are invalid by gipert in https://github.com/legend-exp/legend-pydataobj/pull/83


**Full Changelog**: https://github.com/legend-exp/legend-pydataobj/compare/v1.6.0...v1.6.1

1.6.0

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 https://github.com/legend-exp/legend-pydataobj/pull/73
* Support `VectorOfVectors` of arbitrary dimensionality (as per LH5 spec) by gipert in https://github.com/legend-exp/legend-pydataobj/pull/75
* Support using nested table fields in `Table.eval()` by gipert in https://github.com/legend-exp/legend-pydataobj/pull/81
* Refactor `LH5Store.{read,write}()` by gipert in https://github.com/legend-exp/legend-pydataobj/pull/79
* chore: update pre-commit hooks by pre-commit-ci in https://github.com/legend-exp/legend-pydataobj/pull/80


**Full Changelog**: https://github.com/legend-exp/legend-pydataobj/compare/v1.5.1...v1.6.0

1.5.1

> [!IMPORTANT]
> Releasing this patch version because of a technical problem with PyPI. Please refer to [release notes for v1.5.0](https://github.com/legend-exp/legend-pydataobj/releases/tag/v1.5.0).

1.5.0

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](https://awkward-array.org/) 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:
py
from lgdo.lh5_store import LH5Store, ls
store = LH5Store()
ls("file.lh5")

New recommended syntax:
py
from lgdo import lh5
store = lh5.LH5Store()
lh5.ls("file.lh5")


Read/write LGDOs to disk

Old syntax:
py
store = LH5Store()
obj, _ = store.read_object("obj", "file.lh5")
store.write_object(obj, "obj", "file.lh5")

New syntax:
py
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:
py
table = Table(...)
table.get_dataframe()

New syntax:
py
table.view_as("pd")


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

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

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

New Contributors
* MoritzNeuberger made their first contribution in https://github.com/legend-exp/legend-pydataobj/pull/24

**Full Changelog**: https://github.com/legend-exp/legend-pydataobj/compare/v1.4.2...v1.5.0

1.5.0a5

What's Changed
* Fixed bug in LH5Iterator when number of entries for file is zero by iguinn in https://github.com/legend-exp/legend-pydataobj/pull/39
* Refactor of LH5 I/O routines, deprecation of existing methods by MoritzNeuberger in https://github.com/legend-exp/legend-pydataobj/pull/24
* Support (environment) variables for tweaking Numba at runtime by gipert in https://github.com/legend-exp/legend-pydataobj/pull/44
* Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/43
* Add vectorized operations to VectorOfVectors by iguinn in https://github.com/legend-exp/legend-pydataobj/pull/42
* Bump actions/checkout from 2 to 4 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/46
* Bump actions/setup-python from 2 to 5 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/47
* Add LGDO format conversion utilities by MoritzNeuberger in https://github.com/legend-exp/legend-pydataobj/pull/30
* Added depth option to show and lh5ls by iguinn in https://github.com/legend-exp/legend-pydataobj/pull/52
* chore: update pre-commit hooks by pre-commit-ci in https://github.com/legend-exp/legend-pydataobj/pull/51
* Bump actions/upload-artifact from 3 to 4 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/50
* Bump actions/download-artifact from 3 to 4 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/49
* Reimplement `Table.eval()`, now handling `VectorOfVectors` by gipert in https://github.com/legend-exp/legend-pydataobj/pull/53
* Deprecate `load_nda()` and `load_dfs()` in favour of `.view_as()` by gipert in https://github.com/legend-exp/legend-pydataobj/pull/56
* Support setting a fill value when "exploding" `VectorOfVectors` into NumPy arrays in `.view_as("np")` by gipert in https://github.com/legend-exp/legend-pydataobj/pull/57
* Migrate to pyproject.toml, upgrade pre-commit config by gipert in https://github.com/legend-exp/legend-pydataobj/pull/59
* Fix for reading just first row of VectorOfVectors by ggmarshall in https://github.com/legend-exp/legend-pydataobj/pull/63
* Feature: `lh5.read_as()` to read LH5 data straight into third party data views by gipert in https://github.com/legend-exp/legend-pydataobj/pull/62
* Added warning when adding a column to a table with different length by MoritzNeuberger in https://github.com/legend-exp/legend-pydataobj/pull/58
* Add first version of CITATION.cff by gipert in https://github.com/legend-exp/legend-pydataobj/pull/64
* Bug fix in `LH5Store.read()`: check for `n_rows` longer than `idx`s before dropping by ggmarshall in https://github.com/legend-exp/legend-pydataobj/pull/65
* Bugfix for varlen error msgs and specify nda in view_as "ak" so dtype correctly inferred by ggmarshall in https://github.com/legend-exp/legend-pydataobj/pull/67
* Bump codecov/codecov-action from 3 to 4 by dependabot in https://github.com/legend-exp/legend-pydataobj/pull/66

New Contributors
* MoritzNeuberger made their first contribution in https://github.com/legend-exp/legend-pydataobj/pull/24

**Full Changelog**: https://github.com/legend-exp/legend-pydataobj/compare/v1.4.2...v1.5.0a5

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.