GithubHelp home page GithubHelp logo

dorangyee / ndarray Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rust-ndarray/ndarray

0.0 0.0 0.0 5.92 MB

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations

Home Page: https://docs.rs/ndarray/

License: Apache License 2.0

Rust 99.87% Shell 0.13%

ndarray's Introduction

ndarray

The ndarray crate provides an n-dimensional container for general elements and for numerics.

Please read the API documentation on docs.rs or take a look at the quickstart tutorial.

CI build status_ ndarray at crates.io_ _ IRC at #rust-sci on OFTC_

Highlights

  • Generic 1, 2, ..., n-dimensional arrays
  • Owned arrays and array views
  • Slicing, also with arbitrary step size, and negative indices to mean elements from the end of the axis.
  • Views and subviews of arrays; iterators that yield subviews.

Status and Lookout

  • Still iterating on and evolving the crate
    • The crate is continuously developing, and breaking changes are expected during evolution from version to version. We adopt the newest stable rust features if we need them.
  • Performance:
    • Prefer higher order methods and arithmetic operations on arrays first, then iteration, and as a last priority using indexed algorithms.
    • Efficient floating point matrix multiplication even for very large matrices; can optionally use BLAS to improve it further.

Crate Feature Flags

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

  • std
    • Rust standard library (enabled by default)
    • This crate can be used without the standard library by disabling the default std feature. To do so, use this in your `Cargo.toml`:

      [dependencies] ndarray = { version = "0.x.y", default-features = false }

    • The geomspace linspace logspace range std var var_axis and std_axis methods are only available when std is enabled.
  • serde
    • Enables serialization support for serde 1.x
  • rayon
    • Enables parallel iterators, parallelized methods and par_azip!.
    • Implies std
  • blas
    • Enable transparent BLAS support for matrix multiplication. Uses blas-src for pluggable backend, which needs to be configured separately (see below).
  • matrixmultiply-threading
    • Enable the threading feature in the matrixmultiply package

How to use with cargo

[dependencies]
ndarray = "0.14.0"

How to enable blas integration. Depend on blas-src directly to pick a blas provider. Depend on the same blas-src version as ndarray does, for the selection to work. An example configuration using system openblas is shown below. Note that only end-user projects (not libraries) should select provider:

[dependencies]
ndarray = { version = "0.14.0", features = ["blas"] }
blas-src = { version = "0.7.0", default-features = false, features = ["openblas"] }
openblas-src = { version = "0.9", default-features = false, features = ["cblas", "system"] }

For official releases of ndarray, the versions are:

ndarray blas-src openblas-src
0.15 0.7.0 0.9.0
0.14 0.6.1 0.9.0
0.13 0.2.0 0.6.0
0.12 0.2.0 0.6.0
0.11 0.1.2 0.5.0

Recent Changes

See RELEASES.md.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

ndarray's People

Contributors

bluss avatar bobogei81123 avatar cuviper avatar eijebong avatar exphp avatar hameerabbasi avatar insideoutclub avatar jp-ellis avatar jturner314 avatar kdubovikov avatar kerollmops avatar lloydmeta avatar lukemathwalker avatar maciejkula avatar max-sixty avatar mgeisler avatar mneumann avatar nilgoyette avatar palango avatar robbepop avatar rth avatar sebasv avatar sparrowlii avatar superfluffy avatar termoshtt avatar thelortex avatar vbarrielle avatar viniciusd avatar xd009642 avatar zusez4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.