Skip to content

A library for aggregating values assigned to indices by slices and the other way around

License

Notifications You must be signed in to change notification settings

bm371613/slice-aggregator

Repository files navigation

slice-aggregator

https://travis-ci.org/bm371613/slice-aggregator.svg?branch=master https://readthedocs.org/projects/slice-aggregator/badge/?version=latest

A library for aggregating values assigned to indices by slices

>>> import slice_aggregator
>>> a = slice_aggregator.ixs_by_slices()
>>> a[-5] += 1
>>> a[10] -= 2.5
>>> a[-10:]
-1.5

and the other way around

>>> import slice_aggregator
>>> a = slice_aggregator.slices_by_ixs()
>>> a[:-5] += 1
>>> a[-10:10] -= 2.5
>>> a[-10]
-1.5

Read the docs to find out more!

Installation

pip install slice-aggregator

About

A library for aggregating values assigned to indices by slices and the other way around

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages