Skip to content

Commit 5db7e85

Browse files
committed
Fix SChunk doc reference to API section
1 parent 26c717d commit 5db7e85

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

blosc2/SChunk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,12 @@ def __setitem__(self, key, value):
435435
return super(SChunk, self).set_slice(start=key.start, stop=key.stop, value=value)
436436

437437
def to_cframe(self):
438-
""" Get a bytes object containing the serialized :class:`~blosc2.SChunk` instance.
438+
""" Get a bytes object containing the serialized :ref:`SChunk <SChunk>` instance.
439439
440440
Returns
441441
-------
442442
out: bytes
443-
The buffer containing the serialized :class:`~blosc2.SChunk` instance.
443+
The buffer containing the serialized :ref:`SChunk <SChunk>` instance.
444444
445445
See Also
446446
--------
@@ -454,12 +454,12 @@ def __dealloc__(self):
454454

455455

456456
def open(urlpath, mode="a", **kwargs):
457-
"""Open an already persistently stored :class:`~blosc2.SChunk`.
457+
"""Open an already persistently stored :ref:`SChunk <SChunk>`.
458458
459459
Parameters
460460
----------
461461
urlpath: str
462-
The path where the :class:`~blosc2.SChunk` is stored.
462+
The path where the :ref:`SChunk <SChunk>` is stored.
463463
mode: str, optional
464464
The open mode.
465465

blosc2/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ class SplitMode(Enum):
8585
blosclib_version = "%s (%s)" % (VERSION_STRING, VERSION_DATE)
8686

8787
# Internal Blosc threading
88-
ncores = detect_number_of_cores() / 2
89-
nthreads = ncores
88+
nthreads = ncores = detect_number_of_cores() / 2
9089
"""Number of threads to be used in compression/decompression.
9190
"""
9291
# Protection against too many threads

blosc2/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ def remove_urlpath(path):
10061006

10071007

10081008
def schunk_from_cframe(cframe, copy=False):
1009-
"""Create a :class:`~blosc2.SChunk` instance out of a contiguous frame buffer.
1009+
"""Create a :ref:`SChunk <SChunk>` instance out of a contiguous frame buffer.
10101010
10111011
Parameters
10121012
----------
@@ -1018,8 +1018,8 @@ def schunk_from_cframe(cframe, copy=False):
10181018
10191019
Returns
10201020
-------
1021-
out: :class:`~blosc2.SChunk`
1022-
A new :class:`~blosc2.SChunk` containing the data passed.
1021+
out: :ref:`SChunk <SChunk>`
1022+
A new :ref:`SChunk <SChunk>` containing the data passed.
10231023
10241024
See Also
10251025
--------

doc/reference/schunk_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _SChunk:
2+
13
Super-chunk API
24
===============
35

0 commit comments

Comments
 (0)