Published June 13, 2019
| Version 0.4.0
Software
Open
drdavis/pygram11: 0.4.0
Creators
Description
A breaking change to the API w.r.t. returns. All functions now return sum of weights squared, even if it's None
. The histogramming functions previously had a single array returned if weights were not used. Now None
is returned if no weights are used
>>> x = np.random.randn(1000)
>>> w = np.random.uniform(0.5, 0.8, x.shape[0])
>>> pygram11.histogram(x, bins=5, range=(-3, 3)
(array([ 30., 249., 450., 227., 41.]), None)
>>> pygram11.histogram(x, bins=5, range=(-3, 3), weights=w)
(array([ 19.97159325, 162.31069262, 291.30576246, 147.4478516 ,
27.12625336]), array([ 3.66815712, 10.36897935, 13.85860416, 9.86909866, 4.27544407]))
Files
drdavis/pygram11-0.4.0.zip
Files
(170.8 kB)
Name | Size | Download all |
---|---|---|
md5:5c8d23925197fa453b8c295eb36252fd
|
170.8 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/drdavis/pygram11/tree/0.4.0 (URL)