Skip to content

Developed zfp python wrapper for numcodecs and is ready to be used #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "c-blosc"]
path = c-blosc
url = https://github.com/Blosc/c-blosc.git
[submodule "zfp"]
path = zfp
url = https://github.com/LLNL/zfp.git
Comment on lines +4 to +6
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't need the source code here since we can go the dependency route

Suggested change
[submodule "zfp"]
path = zfp
url = https://github.com/LLNL/zfp.git

Also please remove the submodule as well.

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Contents
registry
blosc
lz4
zfp
zstd
zlib
gzip
Expand Down
17 changes: 17 additions & 0 deletions docs/zfp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Zfp
Copy link
Member

Choose a reason for hiding this comment

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

Not to bikeshed things, but are we wanting this to be zfp or zfpy? Ok either way, just wanted to check that we are happy with the naming before we ship this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If fact, the PR #160 is not needed any more, because @lindstro has their own zfp wrapper, so I have PR #229 ready for you to approve to merge. @jakirkham

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, must have gotten turned around. Should we close this PR out then?

===
.. automodule:: numcodecs.zfp

.. autoclass:: Zfp

.. autoattribute:: codec_id
.. automethod:: encode
.. automethod:: decode
.. automethod:: get_config
.. automethod:: from_config

Helper functions
----------------

.. autofunction:: compress
.. autofunction:: decompress
9 changes: 8 additions & 1 deletion numcodecs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<https://github.com/alimanfoo/numcodecs/issues>`_.

"""

from __future__ import absolute_import, print_function, division
import multiprocessing
import atexit

Expand Down Expand Up @@ -68,6 +68,13 @@
except ImportError: # pragma: no cover
pass

try:
from numcodecs import zfp
from numcodecs.zfp import Zfp
register_codec(Zfp)
except ImportError: # pragma: no cover
pass

from numcodecs.astype import AsType
register_codec(AsType)

Expand Down
Loading