<commit_before>ndarray
=========

The ``ndarray`` crate provides an N-dimensional container for general elements
and for numerics.  Requires Rust 1.11.

Please read the API documentation here: `(0.6 / master)`__, `(0.5)`__, `(0.4)`__, `(0.3)`__, `(0.2)`__

__ http://bluss.github.io/rust-ndarray/
__ http://bluss.github.io/rust-ndarray/0.5/
__ http://bluss.github.io/rust-ndarray/0.4/
__ http://bluss.github.io/rust-ndarray/0.3/
__ http://bluss.github.io/rust-ndarray/0.2/

|build_status|_ |crates|_

.. |build_status| image:: https://travis-ci.org/bluss/rust-ndarray.svg?branch=master
.. _build_status: https://travis-ci.org/bluss/rust-ndarray

.. |crates| image:: http://meritbadge.herokuapp.com/ndarray
.. _crates: https://crates.io/crates/ndarray

Highlights
----------

- Generic N-dimensional array
- Owned arrays and views

  - ``ArrayBase``:
    The N-dimensional array type itself.
  - ``Array``:
    An array where the data is owned uniquely.
  - ``RcArray``:
    An array where the data has shared ownership and is copy on write.
  - ``ArrayView``, ``ArrayViewMut``:
    Lightweight array views.

- Slicing, also with arbitrary step size, and negative indices to mean
  elements from the end of the axis.
- Iteration and most operations are efficient on arrays with contiguous
  innermost dimension.
- Array views can be used to slice and mutate any ``[T]`` data.

Status and Lookout
------------------

- Still iterating on and evolving the API

  + The crate is continuously developing, and breaking changes are expected
    during evolution from version to version. We adhere to semver,
    but alpha releases break at will.
  + We adopt the newest stable rust features we need.

- Performance status:

  + Performance of an operation depends on the memory layout of the array
    or array view. Especially if it's a binary operation, which
    needs matching memory layout to be efficient (with some exceptions).
  + Arithmetic optimizes very well if the arrays are have contiguous inner dimension.
  + The higher order functions like ``.map()``, ``.map_inplace()`` and
    ``.zip_mut_with()`` are the most efficient ways to
    perform single traversal and lock step traversal respectively.
  + ``.iter()`` is efficient for c-contiguous arrays.
  + Can use BLAS in matrix multiplication

Crate Feature Flags
-------------------

The following crate feature flags are available. They are configured in
your `Cargo.toml`.

- ``rustc-serialize``

  - Optional, compatible with Rust stable
  - Enables serialization support for rustc-serialize 0.3

- ``serde``

  - Optional, compatible with Rust stable
  - Enables serialization support for serde 0.8

- ``blas``

  - Optional and experimental, compatible with Rust stable
  - Enable transparent BLAS support for matrix multiplication. Pluggable
    backend via ``blas-sys``.

How to use with cargo::

    [dependencies]
    ndarray = "0.6"

Recent Changes (ndarray)
------------------------

- 0.6.8

  - Fix a bug in a partially consumed elements iterator's ``.fold()``.
    (**Note** that users are recommended to use not use the elements iterator,
    but the higher level functions which are the maps, folds and other methods
    of the array types themselves.)

- 0.6.7

  - Improve performance of a lot of basic operations for arrays where
    the innermost dimension is not contiguous (``.fold(), .map(),
    .to_owned()``, arithmetic operations with scalars).
  - Require Rust 1.11

- 0.6.6

  - Add dimensionality specific type aliases: ``Array0, Array1, Array2, ...``
    and so on (there are many), also ``Ix0, Ix1, Ix2, ...``.
  - Add constructor ``Array::from_shape_fn(D, |D| -> A)``.
  - Improve performance of ``Array::default``, and ``.fold()`` for noncontiguous
    array iterators.

- 0.6.5

  - Add method ``.into_raw_vec()`` to turn an ``Array`` into the its
    underlying element storage vector, in whatever element order it is using.
<commit_msg>Fix typo in README<commit_after>ndarray
=========

The ``ndarray`` crate provides an N-dimensional container for general elements
and for numerics.  Requires Rust 1.11.

Please read the API documentation here: `(0.6 / master)`__, `(0.5)`__, `(0.4)`__, `(0.3)`__, `(0.2)`__

__ http://bluss.github.io/rust-ndarray/
__ http://bluss.github.io/rust-ndarray/0.5/
__ http://bluss.github.io/rust-ndarray/0.4/
__ http://bluss.github.io/rust-ndarray/0.3/
__ http://bluss.github.io/rust-ndarray/0.2/

|build_status|_ |crates|_

.. |build_status| image:: https://travis-ci.org/bluss/rust-ndarray.svg?branch=master
.. _build_status: https://travis-ci.org/bluss/rust-ndarray

.. |crates| image:: http://meritbadge.herokuapp.com/ndarray
.. _crates: https://crates.io/crates/ndarray

Highlights
----------

- Generic N-dimensional array
- Owned arrays and views

  - ``ArrayBase``:
    The N-dimensional array type itself.
  - ``Array``:
    An array where the data is owned uniquely.
  - ``RcArray``:
    An array where the data has shared ownership and is copy on write.
  - ``ArrayView``, ``ArrayViewMut``:
    Lightweight array views.

- Slicing, also with arbitrary step size, and negative indices to mean
  elements from the end of the axis.
- Iteration and most operations are efficient on arrays with contiguous
  innermost dimension.
- Array views can be used to slice and mutate any ``[T]`` data.

Status and Lookout
------------------

- Still iterating on and evolving the API

  + The crate is continuously developing, and breaking changes are expected
    during evolution from version to version. We adhere to semver,
    but alpha releases break at will.
  + We adopt the newest stable rust features we need.

- Performance status:

  + Performance of an operation depends on the memory layout of the array
    or array view. Especially if it's a binary operation, which
    needs matching memory layout to be efficient (with some exceptions).
  + Arithmetic optimizes very well if the arrays are have contiguous inner dimension.
  + The higher order functions like ``.map()``, ``.map_inplace()`` and
    ``.zip_mut_with()`` are the most efficient ways to
    perform single traversal and lock step traversal respectively.
  + ``.iter()`` is efficient for c-contiguous arrays.
  + Can use BLAS in matrix multiplication

Crate Feature Flags
-------------------

The following crate feature flags are available. They are configured in
your `Cargo.toml`.

- ``rustc-serialize``

  - Optional, compatible with Rust stable
  - Enables serialization support for rustc-serialize 0.3

- ``serde``

  - Optional, compatible with Rust stable
  - Enables serialization support for serde 0.8

- ``blas``

  - Optional and experimental, compatible with Rust stable
  - Enable transparent BLAS support for matrix multiplication. Pluggable
    backend via ``blas-sys``.

How to use with cargo::

    [dependencies]
    ndarray = "0.6"

Recent Changes (ndarray)
------------------------

- 0.6.8

  - Fix a bug in a partially consumed elements iterator's ``.fold()``.
    (**Note** that users are recommended to not use the elements iterator,
    but the higher level functions which are the maps, folds and other methods
    of the array types themselves.)

- 0.6.7

  - Improve performance of a lot of basic operations for arrays where
    the innermost dimension is not contiguous (``.fold(), .map(),
    .to_owned()``, arithmetic operations with scalars).
  - Require Rust 1.11

- 0.6.6

  - Add dimensionality specific type aliases: ``Array0, Array1, Array2, ...``
    and so on (there are many), also ``Ix0, Ix1, Ix2, ...``.
  - Add constructor ``Array::from_shape_fn(D, |D| -> A)``.
  - Improve performance of ``Array::default``, and ``.fold()`` for noncontiguous
    array iterators.

- 0.6.5

  - Add method ``.into_raw_vec()`` to turn an ``Array`` into the its
    underlying element storage vector, in whatever element order it is using.

{'fraction_non_alphanumeric': 0.12762171094445152, 'fraction_numerical': 0.012202872759628829, 'mean_word_length': 3.227834497581945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '161811', 'n_tokens_mistral': 2407, 'n_tokens_neox': 2308, 'n_words': 904}