Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

hdrpy

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hdrpy - npm Package Compare versions

Comparing version
0.3
to
0.3.1
+4
-0
CHANGELOG.md

@@ -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

+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

@@ -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()
}
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

@@ -23,2 +23,3 @@ [metadata]

tag_date = 0
tag_svn_revision = 0

@@ -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)