diff --git a/bob/io/base/file.cpp b/bob/io/base/file.cpp index 43a8e93c6f2b5258581171f485ae33113e301a47..859ad36aa9c1be108836263c037bfca8a56eb093 100644 --- a/bob/io/base/file.cpp +++ b/bob/io/base/file.cpp @@ -464,6 +464,7 @@ static auto s_describe = bob::extension::FunctionDoc( .add_parameter("all", "bool", "[Default: ``False``] If set to ``True``, returns the shape and strides for reading the whole file contents in one shot.") .add_return("dtype", ":py:class:`numpy.dtype`", "The data type of the object") .add_return("shape", "tuple", "The shape of the object") +.add_return("stride", "tuple", "The stride of the object") ; static PyObject* PyBobIoFile_describe(PyBobIoFileObject* self, PyObject *args, PyObject* kwds) { BOB_TRY diff --git a/bob/io/base/hdf5.cpp b/bob/io/base/hdf5.cpp index ad8a823b487ceeb4d3d660ef66fb8444679daedb..e9f7957e68155feb209a01eb7b4d8c79adea9cae 100644 --- a/bob/io/base/hdf5.cpp +++ b/bob/io/base/hdf5.cpp @@ -446,13 +446,13 @@ static auto s_describe = bob::extension::FunctionDoc( "describe", "Describes a dataset type/shape, if it exists inside a file", "If a given ``key`` to an HDF5 dataset exists inside the file, returns a type description of objects recorded in such a dataset, otherwise, raises an exception. " - "The returned value type is a tuple of tuples (HDF5Type, number-of-objects, expandable) describing the capabilities if the file is read using these formats. \n\n" - ".. todo:: Check and correct the returned values", + "The returned value type is a list of tuples (HDF5Type, number-of-objects, expandable) describing the capabilities if the file is read using these formats. \n\n", true ) -.add_prototype("key", "shape, size, expandable") +.add_prototype("key", "[(hdf5type, size, expandable)]") .add_parameter("key", "str", "The dataset path to describe") -.add_return("shape", "tuple", "The shape of the returned array") +.add_return("hdf5type", "tuple", "The HDF5Type of the returned array") +.add_return("size", "int", "The number of objects in the dataset") .add_return("expandable", "bool", "Defines if this object can be resized.") ; static PyObject* PyBobIoHDF5File_describe(PyBobIoHDF5FileObject* self, PyObject *args, PyObject* kwds) { diff --git a/doc/guide.rst b/doc/guide.rst index 5533f6bc52ecc26512f83e6bdddb21fbba93496c..62bc46280a24c790854f9f39817f032f6bf8a9f9 100644 --- a/doc/guide.rst +++ b/doc/guide.rst @@ -48,7 +48,7 @@ I/O operations using the class `bob.io.base.HDF5File` ------------------------------------------------------ Writing operations ------------------- +~~~~~~~~~~~~~~~~~~ Let's take a look at how to write simple scalar data such as integers or floats. @@ -179,7 +179,7 @@ of scalars and arrays using the function :py:meth:`bob.io.base.HDF5File.append` instead of :py:meth:`bob.io.base.HDF5File.set`. Reading operations ------------------- +~~~~~~~~~~~~~~~~~~ Reading data from a file that you just wrote to is just as easy. For this task you should use :py:meth:`bob.io.base.HDF5File.read`. The read method will read @@ -259,7 +259,7 @@ would return a 1D uint8 array instead of a 2D array. Pythonic operations on HDF5 files ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can use some Pythonic opertations on :py:class:`bob.io.base.HDF5File`: diff --git a/doc/index.rst b/doc/index.rst index cc498b2d10c142445ef600358094be2d71a8aff2..e6a000903a8b2872933467d27a0c8f9ad2589fe4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -7,6 +7,7 @@ Bob's Core I/O Routines ========================= +This package is a part of `Bob`_. This module contains a basic interface to read and write files of various types. It provides generic functions :py:func:`bob.io.base.save` and :py:func:`bob.io.base.load` to write and read various types of data. In this diff --git a/doc/links.rst b/doc/links.rst index 54a057dbdc120dff6b3d5c6cc65e7b63d2d3db0a..5c4125fa596c3d71fc923cb3c477df7a454f8604 100644 --- a/doc/links.rst +++ b/doc/links.rst @@ -1,80 +1,7 @@ .. vim: set fileencoding=utf-8 : -.. Andre Anjos <andre.anjos@idiap.ch> -.. Tue 20 Mar 2012 08:57:32 CET -.. -.. Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland -.. This file contains all links we use for documentation in a centralized place - -.. Place here references to all citations in lower case - -.. _argparse: http://code.google.com/p/argparse/ .. _blitz++: http://www.oonumerics.org/blitz -.. _bob's idiap guide: https://gitlab.idiap.ch/bob/bob/wikis/Using-Bob-at-Idiap -.. _bob's website: https://www.idiap.ch/software/bob -.. _boost: http://www.boost.org -.. _buildbot: http://trac.buildbot.net -.. _buildout: http://pypi.python.org/pypi/zc.buildout/ -.. _c++: http://www2.research.att.com/~bs/C++.html -.. _cmake: http://www.cmake.org -.. _doxygen: http://www.doxygen.org -.. _dvipng: http://savannah.nongnu.org/projects/dvipng/ -.. _ffmpeg: http://ffmpeg.org -.. _libav: http://libav.org -.. _fftw: http://www.fftw.org/ -.. _fink: http://www.finkproject.org -.. _git: http://git-scm.com/ -.. _github: http://github.com/ -.. _google perftools: http://code.google.com/p/google-perftools +.. _bob: https://www.idiap.ch/software/bob .. _hdf5: http://www.hdfgroup.org/HDF5 -.. _idiap: http://www.idiap.ch -.. _ipython: http://ipython.scipy.org -.. _lapack: http://www.netlib.org/lapack -.. _latex: http://www.latex-project.org/ -.. _libjpeg: http://libjpeg.sourceforge.net/ -.. _libnetpbm: http://netpbm.sourceforge.net/doc/libnetpbm.html -.. _libpng: http://libpng.org/pub/png/libpng.html -.. _libsvm: http://www.csie.ntu.edu.tw/~cjlin/libsvm/ -.. _libtiff: http://www.remotesensing.org/libtiff/ -.. _giflib: http://giflib.sourceforge.net/ -.. _macports installation instructions: http://www.macports.org/install.php -.. _macports: http://www.macports.org -.. _matio: http://matio.sourceforge.net -.. _matlab: http://www.mathworks.ch/products/matlab/ -.. _matplotlib: http://matplotlib.sourceforge.net .. _numpy: http://numpy.scipy.org -.. _nose: http://nose.readthedocs.org -.. _opencv: http://opencv.willowgarage.com/ -.. _pil: http://www.pythonware.com/products/pil/ -.. _pillow: https://pypi.python.org/pypi/Pillow/ .. _python: http://www.python.org -.. _pypi: http://pypi.python.org -.. _qt4: http://qt.nokia.com/ -.. _satellite packages: https://www.idiap.ch/software/bob/packages -.. _scipy: http://www.scipy.org -.. _setuptools: http://trac.edgewall.org/wiki/setuptools -.. _sphinx: http://sphinx.pocoo.org -.. _sqlalchemy: http://www.sqlalchemy.org/ -.. _sqlite: http://www.sqlite.org/ -.. _submit a new bug report: https://www.idiap.ch/software/bob/issues -.. _torch 3 vision: http://torch3vision.idiap.ch -.. _torch 3: http://www.torch.ch -.. _torch 5: http://torch5.sourceforge.net -.. _torch: https://github.com/andresy/torch -.. _vlfeat launchpad webpage: https://launchpad.net/~gezakovacs/+archive/vlfeat -.. _vlfeat: http://www.vlfeat.org/ - -.. Place here references to licenses - -.. _apache-2.0: http://www.opensource.org/licenses/Apache-2.0 -.. _artistic-2.0: http://www.opensource.org/licenses/Artistic-2.0 -.. _bsd-2-clause: http://www.opensource.org/licenses/BSD-2-Clause -.. _bsd-3-clause: http://www.opensource.org/licenses/BSD-3-Clause -.. _bsl-1.0: http://www.opensource.org/licenses/BSL-1.0 -.. _gpl-2.0: http://www.opensource.org/licenses/GPL-2.0 -.. _gpl-3.0: http://www.opensource.org/licenses/GPL-3.0 -.. _hdf5 license: ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/COPYING -.. _lgpl-2.1: http://www.opensource.org/licenses/LGPL-2.1 -.. _libpng license: http://www.libpng.org/pub/png/src/libpng-LICENSE.txt -.. _mit: http://www.opensource.org/licenses/MIT -.. _python-2.0: http://www.opensource.org/licenses/Python-2.0