Skip to content

Release 4.5.0

Choose a tag to compare

@FrancescAlted FrancescAlted released this 15 Jun 12:03

Changes from 4.4.5 to 4.5.0

This release teaches the b2view terminal viewer to plot — peak-preserving
envelope line plots of any series, with zoom, a row-window lock, and an optional
high-resolution matplotlib view — and gives CTable a pandas-like display and
CSV
experience. It also publishes WASM/Pyodide wheels to PyPI and adds
faster strided reads for NDArray and Column.

b2view: plotting and data inspection

  • In-terminal plots: press p on a numeric series (a CTable column or an
    array row) to draw a braille line plot. Plots are peak-preserving min/max
    envelopes by default
    , so no spike or trough is hidden however large the
    series is; large local series stream their envelope exactly in bounded
    spans (only remote c2arrays fall back to a labeled strided sample).
  • Zoom and row-window lock: zoom the plot into a row range and pan it; press
    v to lock the data grid to the plotted range so paging stays inside it
    (escape unlocks). The plot and high-res views honor the locked window.
  • High-resolution view: h opens a high-res matplotlib image of the
    plotted range (new optional hires extra: matplotlib + textual-image).
  • On-demand cell decode: enter decodes a single skipped/expensive CTable
    cell, and SChunk nodes now preview as a paged hex dump.
  • Fixes and polish: row paging re-aligns to the page grid after dim-mode
    single-row scrolls; the data panel now focuses correctly with
    --path ... --panel data; status chips are branded yellow.

CTable display

  • CTable.to_string() now renders the whole table by default (every row and
    every column), like pandas' DataFrame.to_string(). New max_rows and
    max_width parameters truncate on demand. Behaviour change: previously
    to_string() returned the truncated view; code that relied on that should
    pass max_rows=/max_width= (or use str()).
  • The [N rows x M columns] dimensions footer now follows pandas: omitted by
    to_string() (pass show_dimensions=True to force it), and shown by
    str/repr/print only when the view is actually truncated. Previously it
    was always appended.
  • repr(ctable) now shows the same truncated table as str(ctable)
    (pandas/polars convention), instead of the one-line CTable<…> summary. The
    compact summary remains available via ctable.info.
  • New display options in set_printoptions: display_width controls the
    column-fitting width budget (None = auto-detect terminal, -1 = show all
    columns, positive int = fixed budget), and display_rows now accepts -1 to
    show all rows (0 still shows none).
  • New blosc2.printoptions(...) context manager temporarily sets the display
    options and restores them on exit, e.g.
    with blosc2.printoptions(display_rows=-1, display_width=-1): print(t).

CTable I/O

  • CTable.to_csv() now accepts no path, returning the CSV as a string like
    pandas' DataFrame.to_csv(). Passing a path still writes the file (and
    returns None); the returned string is byte-for-byte the same as the file.

Performance

  • Faster strided reads: NDArray.__getitem__ gains a sparse-gather fast
    path for large strides, and Column.__getitem__ short-circuits when the
    logical positions equal the physical ones.
  • Fix: a negative step in Column getitem could return []; it now
    returns the reversed selection.

Indexing

  • Fix: a sidecar-handle cache collision could return the wrong SUMMARY
    index for a compact-store column.
  • Cross-column index pruning is now enabled for compact CTable queries, so
    more predicates prune blocks before any data is materialized. The docs also
    note when summary indexes are not created automatically.

Packaging

  • WASM/Pyodide wheels on PyPI: the main wheel build now also produces
    pyemscripten wheels for CPython 3.13 (2025 ABI) and 3.14 (2026 ABI) and
    uploads them to PyPI, so blosc2 is micropip-installable in Pyodide, and
    b2view prints a clear message instead of crashing when run under WASM.
    Known limitation: slicing an in-memory SChunk loaded from a frame fails on
    the Pyodide 0.29.x Emscripten toolchain (cp313); it works on Pyodide 314
    (cp314) and natively. See issue #664.
  • cibuildwheel updated to 4.1.