Following issue #650 (which added runnable examples to CTable.where() and sort_by()), several fundamental array constructors in src/blosc2/ndarray.py (empty, zeros, full, fromiter, asarray, linspace) and core SChunk methods in src/blosc2/schunk.py (append_data, get_chunk, decompress_chunk) lack runnable, copy-pasteable Examples: sections in their docstrings.
Furthermore, pytest.ini currently tests doctests only on core.py, ndarray.py, and schunk.py.
Suggested Work
- Add NumPy-style runnable docstrings with code and expected output to:
src/blosc2/ndarray.py: empty(), zeros(), full(), fromiter(), asarray(), linspace().
src/blosc2/schunk.py: append_data(), get_chunk(), decompress_chunk().
src/blosc2/lazyexpr.py: compute(), save().
- Demonstrate realistic parameters in each example:
chunks=, blocks=, cparams=, and urlpath=.
- Verify that all docstrings pass
pytest --doctest-modules.
Following issue #650 (which added runnable examples to
CTable.where()andsort_by()), several fundamental array constructors insrc/blosc2/ndarray.py(empty,zeros,full,fromiter,asarray,linspace) and core SChunk methods insrc/blosc2/schunk.py(append_data,get_chunk,decompress_chunk) lack runnable, copy-pasteableExamples:sections in their docstrings.Furthermore,
pytest.inicurrently tests doctests only oncore.py,ndarray.py, andschunk.py.Suggested Work
src/blosc2/ndarray.py:empty(),zeros(),full(),fromiter(),asarray(),linspace().src/blosc2/schunk.py:append_data(),get_chunk(),decompress_chunk().src/blosc2/lazyexpr.py:compute(),save().chunks=,blocks=,cparams=, andurlpath=.pytest --doctest-modules.