Skip to content

ndarray 0.5.0 #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "ndarray"
version = "0.5.0-alpha.2"
version = "0.5.0"
authors = ["bluss"]
license = "MIT/Apache-2.0"

Expand Down
14 changes: 14 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ How to use with cargo::
Recent Changes (ndarray)
------------------------

- 0.5.0

- Require Rust 1.8 and exable +=, -= and other assign operators.
All ``iadd, iadd_scalar`` and similar methods are now deprecated.
- ndarray now has a prelude: ``use ndarray::prelude::*;``.
- Constructors from_elem, zeros, from_shape_vec now all support passing a custom
memory layout. A lot of specific constructors were deprecated.
- Add method ``.select(Axis, &[Ix]) -> OwnedArray``, to create an array
from a non-contiguous pick of subviews along an axis.
- Rename ``.mat_mul()`` to just ``.dot()`` and add a function ``general_mat_mul``
for matrix multiplication with scaling into an existing array.
- **Change .fold() to use arbitrary order.**
- See below for more details

- 0.5.0-alpha.2

- Fix a namespace bug in the stack![] macro.
Expand Down
4 changes: 2 additions & 2 deletions ndarray-rand/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ndarray-rand"
version = "0.1.0"
version = "0.1.1"
authors = ["bluss"]
license = "MIT/Apache-2.0"

Expand All @@ -13,4 +13,4 @@ keywords = ["multidimensional", "matrix", "rand", "ndarray"]

[dependencies]
rand = "0.3"
ndarray = { version = ">= 0.4.4, <= 0.5.0-alpha.10", path = ".." }
ndarray = { version = ">= 0.4.9, < 0.6", path = ".." }
1 change: 1 addition & 0 deletions ndarray-rand/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ impl<S, D> RandomExt<S, D> for ArrayBase<S, D>
Self::random_using(dim, dist, &mut rand::weak_rng())
}

#[allow(deprecated)] // from_vec_dim
fn random_using<IdS, R>(dim: D, dist: IdS, rng: &mut R) -> ArrayBase<S, D>
where IdS: IndependentSample<S::Elem>,
R: Rng
Expand Down
4 changes: 2 additions & 2 deletions ndarray-rblas/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ndarray-rblas"
version = "0.1.0"
version = "0.1.1"
authors = ["bluss"]
license = "MIT/Apache-2.0"

Expand All @@ -12,7 +12,7 @@ keywords = ["multidimensional", "matrix", "blas"]

[dependencies]
rblas = "0.0.13"
ndarray = { version = ">= 0.4.2, < 0.5.0-alpha.10", path = ".." }
ndarray = { version = ">= 0.4.9, < 0.6", path = ".." }

[dev-dependencies]
num = { version = "0.1", default-features = false }
1 change: 1 addition & 0 deletions ndarray-rblas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ fn is_inner_contiguous<S, D>(a: &ArrayBase<S, D>) -> bool

/// If the array is not in the standard layout, copy all elements
/// into the standard layout so that the array is C-contiguous.
#[allow(deprecated)] // from_vec_dim
fn ensure_standard_layout<A, S, D>(a: &mut ArrayBase<S, D>)
where S: DataOwned<Elem=A>,
D: Dimension,
Expand Down
7 changes: 6 additions & 1 deletion src/impl_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,12 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
}
}

/// Fold along an axis
/// Fold along an axis.
///
/// Combine the elements of each subview with the previous using the `fold`
/// function and initial value `init`.
///
/// Return the result as an `OwnedArray`.
pub fn fold_axis<B, F>(&self, axis: Axis, init: B, mut fold: F)
-> OwnedArray<B, D::Smaller>
where D: RemoveAxis,
Expand Down