hdrpy
Advanced tools
+4
-0
@@ -10,2 +10,6 @@ # Changelog | ||
| ## 0.3.1 2018-02-15 | ||
| ### Added | ||
| - Added `get_value_counts()` method to histogram API | ||
| ## 0.3 — 2018-02-12 | ||
@@ -12,0 +16,0 @@ ### Fixed |
| Metadata-Version: 1.1 | ||
| Name: hdrpy | ||
| Version: 0.3 | ||
| Version: 0.3.1 | ||
| Summary: HDR histogram implementation based on numpy | ||
@@ -9,3 +9,2 @@ Home-page: https://github.com/dmand/hdrpy | ||
| License: Apache 2.0 | ||
| Description-Content-Type: UNKNOWN | ||
| Description: UNKNOWN | ||
@@ -12,0 +11,0 @@ Keywords: hdrpy,hdr,histogram,high dynamic range |
@@ -551,1 +551,9 @@ """ | ||
| self.record_value(other_hist.get_value_from_index(index), other_count) | ||
| def get_value_counts(self): | ||
| """Returns a dict {recorded_value: count} | ||
| """ | ||
| return { | ||
| item.value_iterated_to: item.count_at_value_iterated_to | ||
| for item in self.get_recorded_iterator() | ||
| } |
+1
-2
| Metadata-Version: 1.1 | ||
| Name: hdrpy | ||
| Version: 0.3 | ||
| Version: 0.3.1 | ||
| Summary: HDR histogram implementation based on numpy | ||
@@ -9,3 +9,2 @@ Home-page: https://github.com/dmand/hdrpy | ||
| License: Apache 2.0 | ||
| Description-Content-Type: UNKNOWN | ||
| Description: UNKNOWN | ||
@@ -12,0 +11,0 @@ Keywords: hdrpy,hdr,histogram,high dynamic range |
+1
-0
@@ -23,2 +23,3 @@ [metadata] | ||
| tag_date = 0 | ||
| tag_svn_revision = 0 | ||
+1
-1
@@ -7,3 +7,3 @@ from setuptools import setup | ||
| name="hdrpy", | ||
| version="0.3", | ||
| version="0.3.1", | ||
| description="HDR histogram implementation based on numpy", | ||
@@ -10,0 +10,0 @@ author="Dmitri Pribysh", |
@@ -169,1 +169,9 @@ from hdrpy import HdrHistogram | ||
| self.assertEqual(values, expected) | ||
| def test_value_counts(self): | ||
| hist = HdrHistogram(1, 1000, 3) | ||
| counts = {10: 100, 20: 200, 30: 300} | ||
| for value, count in counts.items(): | ||
| hist.record_value(value, count) | ||
| recovered_counts = hist.get_value_counts() | ||
| self.assertEqual(recovered_counts, counts) |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
59285
1.01%659
2.17%