Skip to content
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

Drop wrapper for NumPy iterators. #324

Merged
merged 2 commits into from
Aug 25, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

- Unreleased
- Drop our wrapper for NumPy iterators which were deprecated in v0.16.0 as ndarray's iteration facilities are almost always preferable. ([#324](https://github.com/PyO3/rust-numpy/pull/324))

- v0.17.0
- Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. ([#274](https://github.com/PyO3/rust-numpy/pull/274))
Expand Down
85 changes: 0 additions & 85 deletions benches/iter.rs

This file was deleted.

14 changes: 11 additions & 3 deletions examples/simple/tests/test_ext.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import numpy as np
from rust_ext import head, axpy, conj, mult, extract, add_minutes_to_seconds, polymorphic_add
from rust_ext import (
head,
axpy,
conj,
mult,
extract,
add_minutes_to_seconds,
polymorphic_add,
)


def test_head():
x = np.array(['first', None, 42])
x = np.array(["first", None, 42])
first = head(x)
assert first == 'first'
assert first == "first"


def test_axpy():
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ pub mod datetime;
mod dtype;
mod error;
pub mod npyffi;
pub mod npyiter;
mod slice_container;
mod sum_products;

Expand All @@ -64,10 +63,6 @@ pub use crate::convert::{IntoPyArray, NpyIndex, ToNpyDims, ToPyArray};
pub use crate::dtype::{dtype, Complex32, Complex64, Element, PyArrayDescr};
pub use crate::error::{BorrowError, FromVecError, NotContiguousError};
pub use crate::npyffi::{PY_ARRAY_API, PY_UFUNC_API};
#[allow(deprecated)]
pub use crate::npyiter::{
IterMode, NpyIterFlag, NpyMultiIter, NpyMultiIterBuilder, NpySingleIter, NpySingleIterBuilder,
};
pub use crate::sum_products::{dot, einsum, inner};

pub use ndarray::{array, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn};
Expand Down
Loading