Skip to content

Commit 2fe6723

Browse files
committed
Reformat doc
1 parent 2881117 commit 2fe6723

File tree

9 files changed

+71
-6
lines changed

9 files changed

+71
-6
lines changed

blosc2/SChunk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def append_data(self, data):
113113
"""Append a data buffer to the SChunk.
114114
115115
The data buffer must be of size `chunksize` specified in
116-
:func:`__init__` .
116+
:func:`SChunk.__init__ <blosc2.SChunk.SChunk.__init__>`.
117117
118118
Parameters
119119
----------

blosc2/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ class SplitMode(Enum):
8585
blosclib_version = "%s (%s)" % (VERSION_STRING, VERSION_DATE)
8686

8787
# Internal Blosc threading
88-
nthreads = ncores = detect_number_of_cores() / 2
88+
ncores = detect_number_of_cores() / 2
89+
nthreads = ncores
90+
"""Number of threads to be used in compression/decompression.
91+
"""
8992
# Protection against too many threads
9093
if nthreads > 8:
9194
nthreads = 8
@@ -166,4 +169,5 @@ class SplitMode(Enum):
166169
"SChunk",
167170
"open",
168171
"remove_urlpath",
172+
"nthreads"
169173
]

blosc2/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def pack_array2(arr, chunksize=None, **kwargs):
409409
Other parameters
410410
----------------
411411
kwargs: dict, optional
412-
These are the same as the kwargs in :func:`~blosc2.SChunk.SChunk.__init__`.
412+
These are the same as the kwargs in :func:`SChunk.__init__ <blosc2.SChunk.SChunk.__init__>`.
413413
414414
Examples
415415
--------
@@ -526,7 +526,7 @@ def save_array(arr, urlpath, chunksize=None, **kwargs):
526526
Other parameters
527527
----------------
528528
kwargs: dict, optional
529-
These are the same as the kwargs in :func:`~blosc2.SChunk.SChunk.__init__`.
529+
These are the same as the kwargs in :func:`SChunk.__init__ <blosc2.SChunk.SChunk.__init__>`.
530530
531531
Examples
532532
--------
@@ -678,7 +678,7 @@ def set_nthreads(nthreads):
678678
679679
See also
680680
--------
681-
:func:`~blosc2.get_nthreads`
681+
:attr:`~blosc2.nthreads`
682682
"""
683683
blosc2.nthreads = nthreads
684684
return blosc2_ext.set_nthreads(nthreads)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
blosc2.Codec
2+
============
3+
4+
.. currentmodule:: blosc2
5+
6+
.. autoclass:: Codec
7+
8+
.. rubric:: Attributes
9+
10+
.. autosummary::
11+
12+
~Codec.BLOSCLZ
13+
~Codec.LZ4
14+
~Codec.LZ4HC
15+
~Codec.ZLIB
16+
~Codec.ZSTD
17+
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
blosc2.Filter
2+
=============
3+
4+
.. currentmodule:: blosc2
5+
6+
.. autoclass:: Filter
7+
8+
.. rubric:: Attributes
9+
10+
.. autosummary::
11+
12+
~Filter.NOFILTER
13+
~Filter.SHUFFLE
14+
~Filter.BITSHUFFLE
15+
~Filter.DELTA
16+
~Filter.TRUNC_PREC
17+
18+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
blosc2.SplitMode
2+
================
3+
4+
.. currentmodule:: blosc2
5+
6+
.. autoclass:: SplitMode
7+
8+
.. rubric:: Attributes
9+
10+
.. autosummary::
11+
12+
~SplitMode.ALWAYS_SPLIT
13+
~SplitMode.NEVER_SPLIT
14+
~SplitMode.AUTO_SPLIT
15+
~SplitMode.FORWARD_COMPAT_SPLIT
16+
17+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
blosc2.nthreads
2+
===============
3+
4+
.. currentmodule:: blosc2
5+
6+
.. autodata:: nthreads
7+
:no-value:

doc/reference/top_level.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Set / Get compression params
4040
print_versions
4141
set_blocksize
4242
set_nthreads
43+
nthreads
4344
set_releasegil
4445
set_compressor
4546
get_compressor

0 commit comments

Comments
 (0)