Skip to content

Commit ac945e6

Browse files
committed
Drop deprecations introduced in version 0.17.0.
1 parent 0a99920 commit ac945e6

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
- Unreleased
4+
- Drop deprecated `PyArray::from_exact_iter` as it does not provide any benefits over `PyArray::from_iter`. ([#370](https://github.com/PyO3/rust-numpy/pull/370))
45

56
- v0.18.0
67
- Add conversions from and to datatypes provided by the [`nalgebra` crate](https://nalgebra.org/). ([#347](https://github.com/PyO3/rust-numpy/pull/347))

src/array.rs

-26
Original file line numberDiff line numberDiff line change
@@ -1248,32 +1248,6 @@ impl<T: Element> PyArray<T, Ix1> {
12481248
vec.into_pyarray(py)
12491249
}
12501250

1251-
/// Construct a one-dimensional array from an [`ExactSizeIterator`].
1252-
///
1253-
/// # Example
1254-
///
1255-
/// ```
1256-
/// use numpy::PyArray;
1257-
/// use pyo3::Python;
1258-
///
1259-
/// Python::with_gil(|py| {
1260-
/// let pyarray = PyArray::from_exact_iter(py, [1, 2, 3, 4, 5].into_iter().copied());
1261-
/// assert_eq!(pyarray.readonly().as_slice().unwrap(), &[1, 2, 3, 4, 5]);
1262-
/// });
1263-
/// ```
1264-
#[deprecated(
1265-
since = "0.17.0",
1266-
note = "`from_exact_iter` is deprecated as it does not provide any benefit over `from_iter`."
1267-
)]
1268-
#[inline(always)]
1269-
pub fn from_exact_iter<I>(py: Python<'_>, iter: I) -> &Self
1270-
where
1271-
I: IntoIterator<Item = T>,
1272-
I::IntoIter: ExactSizeIterator,
1273-
{
1274-
Self::from_iter(py, iter)
1275-
}
1276-
12771251
/// Construct a one-dimensional array from an [`Iterator`].
12781252
///
12791253
/// If no reliable [`size_hint`][Iterator::size_hint] is available,

0 commit comments

Comments
 (0)