Skip to content

Commit

Permalink
Merge pull request #1255 from tdegeus/histogram
Browse files Browse the repository at this point in the history
Removed type-o in docs, minor code style consistency update
  • Loading branch information
JohanMabille committed Nov 16, 2018
2 parents 02ce758 + 3330252 commit 6e4e60c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/source/histogram.rst
Expand Up @@ -15,7 +15,7 @@ Basic usage
.. code-block:: cpp
xt::histogram(a, bins[, weights][, density])
xt::histogram_bin_edges(a, bins[, weights][, left, right][, bins][, mode])
xt::histogram_bin_edges(a[, weights][, left, right][, bins][, mode])
Any of the options ``[...]`` can be omitted (though the order must be preserved). The defaults are:

Expand Down
14 changes: 7 additions & 7 deletions include/xtensor/xhistogram.hpp
Expand Up @@ -328,8 +328,8 @@ namespace xt
* @return An one-dimensional xarray<double>, length: bins+1.
*/
template<class E1, class E2>
inline auto histogram_bin_edges(E1&& data, E2 left, E2 right,
std::size_t bins=10, histogram_algorithm mode=histogram_algorithm::automatic
inline auto histogram_bin_edges(E1&& data, E2 left, E2 right, std::size_t bins = 10,
histogram_algorithm mode = histogram_algorithm::automatic
)
{
using value_type = typename std::decay_t<E1>::value_type;
Expand All @@ -342,12 +342,12 @@ namespace xt

/**
* Count number of occurrences of each value in array of non-negative ints.
*
*
* The number of bins (of size 1) is one larger than the largest value in x.
* If minlength is specified, there will be at least this number of bins in
* the output array (though it will be longer if necessary, depending on the
* contents of x). Each bin gives the number of occurrences of its index
* value in x. If weights is specified the input array is weighted by it,
* If minlength is specified, there will be at least this number of bins in
* the output array (though it will be longer if necessary, depending on the
* contents of x). Each bin gives the number of occurrences of its index
* value in x. If weights is specified the input array is weighted by it,
* i.e. if a value ``n`` is found at position ``i``, ``out[n] += weight[i]``
* instead of ``out[n] += 1``.
*
Expand Down

0 comments on commit 6e4e60c

Please sign in to comment.