Skip to content

Add integer compression/decompression.#2

Merged
samaloney merged 5 commits intoi4Ds:masterfrom
samaloney:feat-int-compression
Nov 13, 2020
Merged

Add integer compression/decompression.#2
samaloney merged 5 commits intoi4Ds:masterfrom
samaloney:feat-int-compression

Conversation

@samaloney
Copy link
Collaborator

No description provided.

@codecov-io
Copy link

codecov-io commented Nov 9, 2020

Codecov Report

Merging #2 (cbc5db2) into master (ca0f456) will increase coverage by 20.68%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           master        #2       +/-   ##
============================================
+ Coverage   79.31%   100.00%   +20.68%     
============================================
  Files           2         2               
  Lines          29        63       +34     
============================================
+ Hits           23        63       +40     
+ Misses          6         0        -6     
Impacted Files Coverage Δ
stixcore/__init__.py 100.00% <ø> (ø)
stixcore/calibration/compression.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca0f456...cbc5db2. Read the comment docs.

@samaloney samaloney force-pushed the feat-int-compression branch 6 times, most recently from 2b7c823 to f73bb92 Compare November 9, 2020 22:44
@samaloney samaloney force-pushed the feat-int-compression branch from f73bb92 to aef0f49 Compare November 9, 2020 22:51
* add tests for error raised
* remove template code
"""
values = np.atleast_1d(np.array(values))
if not np.issubdtype(values.dtype, np.integer):
raise ValueError(f'Input must be an integer type not {values.dtype}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could create your own error types like: NonIntCompressionError

Copy link
Collaborator

@nicHoch nicHoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also discussed the usage of default parameters (s, k m ..).
but came to the conclusion that the codebase should have as less implicit states as possible

@samaloney samaloney force-pushed the feat-int-compression branch from cbc5db2 to 5c80b21 Compare November 13, 2020 09:26
@samaloney samaloney merged commit b014a12 into i4Ds:master Nov 13, 2020
@samaloney samaloney deleted the feat-int-compression branch November 13, 2020 11:41
nicHoch pushed a commit to nicHoch/STIXCore that referenced this pull request Mar 1, 2021
Add integer compression/decompression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants