Skip to content

Commit c6c459d

Browse files
Merge branch 'master' of https://github.com/bluss/ndarray into order-statistics
2 parents ded4e94 + 8b5af54 commit c6c459d

File tree

12 files changed

+137
-141
lines changed

12 files changed

+137
-141
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo: required
44
dist: trusty
55
matrix:
66
include:
7-
- rust: 1.26.0
7+
- rust: 1.27.0
88
env:
99
- FEATURES='test docs'
1010
- rust: stable

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "ndarray"
4-
version = "0.11.2"
4+
version = "0.12.0"
55
authors = ["bluss"]
66
license = "MIT/Apache-2.0"
77
readme = "README-crates.io.md"

README.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,17 @@ provider::
8888
Recent Changes (ndarray)
8989
------------------------
9090

91-
- 0.12.0 (not yet released)
91+
- 0.12.0
9292

9393
- Add ``var_axis`` method for computing variance by @LukeMathWalker.
94+
- Add ``map_mut`` and ``map_axis_mut`` methods (mutable variants of ``map`` and ``map_axis``) by @LukeMathWalker.
9495
- Add support for 128-bit integer scalars (``i128`` and ``u128``).
96+
- Add support for slicing with inclusive ranges (``start..=end`` and ``..=end``).
97+
- Relax constraint on closure from ``Fn`` to ``FnMut`` for ``mapv``, ``mapv_into``, ``map_inplace`` and ``mapv_inplace``.
98+
- Implement ``TrustedIterator`` for ``IterMut``.
9599
- Bump ``num-traits`` and ``num-complex`` to version ``0.2``.
96100
- Bump ``blas-src`` to version ``0.2``.
97-
- Bump minimum required Rust version to 1.26.
101+
- Bump minimum required Rust version to 1.27.
98102
- Additional contributors to this release: @ExpHP, @jturner314, @alexbool, @messense, @danmack, @nbro
99103

100104
- 0.11.2

ndarray-rand/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ndarray-rand"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
authors = ["bluss"]
55
license = "MIT/Apache-2.0"
66

@@ -13,7 +13,7 @@ keywords = ["multidimensional", "matrix", "rand", "ndarray"]
1313

1414
[dependencies]
1515
rand = "0.5.0"
16-
ndarray = { version = "0.11.0", path = ".." }
16+
ndarray = { version = "0.12.0", path = ".." }
1717

1818
[package.metadata.release]
1919
no-dev-version = true

ndarray-rand/README.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ ndarray-rand
44
Recent Changes
55
--------------
66

7-
- 0.8.0 (not yet released)
7+
- 0.8.0
88

9+
- Require ndarray 0.12
910
- Require rand 0.5
1011

1112
- 0.7.0

parallel/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ndarray-parallel"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
authors = ["bluss"]
55
license = "MIT/Apache-2.0"
66

@@ -14,7 +14,7 @@ categories = ["data-structures", "science", "concurrency"]
1414

1515
[dependencies]
1616
rayon = { version = "1.0" }
17-
ndarray = { version = "0.11.0", path = "../" }
17+
ndarray = { version = "0.12.0", path = "../" }
1818

1919
[dev-dependencies]
2020
num_cpus = "1.2"

parallel/README.rst

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ How to use with cargo::
4949
Recent Changes (ndarray-parallel)
5050
---------------------------------
5151

52+
- 0.9.0
53+
54+
- Upgrade for ndarray 0.12.0
55+
5256
- 0.8.0
5357

5458
- Upgrade for rayon 1.0!

parallel/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
//! });
9393
//! }
9494
//! ```
95-
#![doc(html_root_url = "http://docs.rs/ndarray-parallel/0.7/")]
95+
#![doc(html_root_url = "http://docs.rs/ndarray-parallel/0.9/")]
9696

9797

9898
pub extern crate ndarray;

src/impl_methods.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1739,8 +1739,8 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
17391739
/// [1., 2.]])
17401740
/// );
17411741
/// ```
1742-
pub fn mapv<B, F>(&self, f: F) -> Array<B, D>
1743-
where F: Fn(A) -> B,
1742+
pub fn mapv<B, F>(&self, mut f: F) -> Array<B, D>
1743+
where F: FnMut(A) -> B,
17441744
A: Clone,
17451745
{
17461746
self.map(move |x| f(x.clone()))
@@ -1752,7 +1752,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
17521752
/// Elements are visited in arbitrary order.
17531753
pub fn mapv_into<F>(mut self, f: F) -> Self
17541754
where S: DataMut,
1755-
F: Fn(A) -> A,
1755+
F: FnMut(A) -> A,
17561756
A: Clone,
17571757
{
17581758
self.mapv_inplace(f);
@@ -1764,7 +1764,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
17641764
/// Elements are visited in arbitrary order.
17651765
pub fn map_inplace<F>(&mut self, f: F)
17661766
where S: DataMut,
1767-
F: Fn(&mut A),
1767+
F: FnMut(&mut A),
17681768
{
17691769
self.unordered_foreach_mut(f);
17701770
}
@@ -1785,9 +1785,9 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
17851785
/// [0.36788, 7.38906]]), 1e-5)
17861786
/// );
17871787
/// ```
1788-
pub fn mapv_inplace<F>(&mut self, f: F)
1788+
pub fn mapv_inplace<F>(&mut self, mut f: F)
17891789
where S: DataMut,
1790-
F: Fn(A) -> A,
1790+
F: FnMut(A) -> A,
17911791
A: Clone,
17921792
{
17931793
self.unordered_foreach_mut(move |x| *x = f(x.clone()));

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
//! + Efficient floating point matrix multiplication even for very large
5454
//! matrices; can optionally use BLAS to improve it further.
5555
//! + See also the [`ndarray-parallel`] crate for integration with rayon.
56-
//! - **Requires Rust 1.26**
56+
//! - **Requires Rust 1.27**
5757
//!
5858
//! [`ndarray-parallel`]: https://docs.rs/ndarray-parallel
5959
//!

0 commit comments

Comments
 (0)